summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-48-novec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-48-novec.c b/gcc/testsuite/gcc.dg/Warray-bounds-48-novec.c
index da179a2c0f5..5cae8566209 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-48-novec.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-48-novec.c
@@ -238,15 +238,17 @@ static void warn_a1_init (struct A1 *p)
238 238
239static void warn_a1_local_buf (struct A1 *p) 239static void warn_a1_local_buf (struct A1 *p)
240{ 240{
241 p->a1[0] = 0; p->a1[1] = 1; p->a1[2] = 2; p->a1[3] = 3; 241 p->a1[0] = 0; p->a1[1] = 1; p->a1[2] = 2;
242 242
243 p->a1[3] = 3; // { dg-warning "\\\[-Warray-bounds" "" { target default_packed } }
243 p->a1[4] = 4; // { dg-warning "\\\[-Warray-bounds" } 244 p->a1[4] = 4; // { dg-warning "\\\[-Warray-bounds" }
244} 245}
245 246
246static void warn_a1_extern_buf (struct A1 *p) 247static void warn_a1_extern_buf (struct A1 *p)
247{ 248{
248 p->a1[0] = 0; p->a1[1] = 1; p->a1[2] = 2; p->a1[3] = 3; p->a1[4] = 4; 249 p->a1[0] = 0; p->a1[1] = 1; p->a1[2] = 2; p->a1[3] = 3;
249 250
251 p->a1[4] = 4; // { dg-warning "\\\[-Warray-bounds" "" { target default_packed } }
250 p->a1[5] = 5; // { dg-warning "\\\[-Warray-bounds" } 252 p->a1[5] = 5; // { dg-warning "\\\[-Warray-bounds" }
251} 253}
252 254