]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/gcc.dg/Warray-bounds-63.c
Correct handling of variable offset minus constant in -Warray-bounds [PR100137]
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / Warray-bounds-63.c
index a3fc91882113a0caea87fca458ab1297e325210d..530e2c564528193be971a13fed8bd259c9e5a57c 100644 (file)
@@ -14,7 +14,7 @@ void sink (void*);
 
 void byte_store_to_decl (void)
 {
-  struct S6 { char a[6]; } s;   // { dg-message "referencing 's'" }
+  struct S6 { char a[6]; } s;   // { dg-message "at offset 6 into object 's' of size 6" "note" }
 
   char *p = (char*)&s;
 
@@ -27,7 +27,7 @@ void byte_store_to_decl (void)
 
 void word_store_to_decl (void)
 {
-  struct S6 { char a[6]; } s;   // { dg-message "referencing 's'" }
+  struct S6 { char a[6]; } s;   // { dg-message "at offset 5 into object 's' of size 6" "note" }
 
   char *p = (char*)&s;
 
@@ -43,7 +43,7 @@ void word_store_to_decl (void)
 void word_store_to_alloc (void)
 {
   struct S6 { char a[6]; } *p;
-  p = alloca (sizeof *p);       // { dg-message "referencing an object of size 6 allocated by 'alloca'" }
+  p = alloca (sizeof *p);       // { dg-message "at offset 5 into object of size 6 allocated by 'alloca'" "note" }
 
   int16_t *q = (int16_t*)((char*)p + 1);