]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: fix two newly-running -Wstringop-overflow test directives
authorSam James <sam@gentoo.org>
Fri, 4 Oct 2024 06:47:54 +0000 (07:47 +0100)
committerSam James <sam@gentoo.org>
Fri, 4 Oct 2024 08:42:40 +0000 (09:42 +0100)
This didn't show up until the previous commit which fixed the directive
syntax. The indexing was off for the notes.

gcc/testsuite/ChangeLog:

* gcc.dg/Wstringop-overflow-79.c: Fix index for notes.
* gcc.dg/Wstringop-overflow-80.c: Ditto.

gcc/testsuite/gcc.dg/Wstringop-overflow-79.c
gcc/testsuite/gcc.dg/Wstringop-overflow-80.c

index e97cb91ba18d7346e47b9bede454d486a6ba9106..87bf775c0b2be0c8cef5377faa353d6c23d374d2 100644 (file)
@@ -29,7 +29,7 @@ void test_3_notes (int i)
 extern char c[8];                 // { dg-message "at offset \\\[3, 6] into destination object 'c'" "note 1" }
                                   // { dg-message "at offset \\\[4, 7] into destination object 'c'" "note 2" { target *-*-* } .-1 }
                                   // { dg-message "at offset \\\[5, 8] into destination object 'c'" "note 3" { target *-*-* } .-2 }
-                                  // { dg-message "at offset \\\[6, 8] into destination object 'c'" "note 3" { target *-*-* } .-2 }
+                                  // { dg-message "at offset \\\[6, 8] into destination object 'c'" "note 4" { target *-*-* } .-3 }
 
 void test_4_notes (int i)
 {
@@ -50,8 +50,8 @@ void test_4_notes (int i)
 extern char d[8];                 // { dg-message "at offset \\\[3, 6] into destination object 'd'" "note 1" }
                                   // { dg-message "at offset \\\[4, 7] into destination object 'd'" "note 2" { target *-*-* } .-1 }
                                   // { dg-message "at offset \\\[5, 8] into destination object 'd'" "note 3" { target *-*-* } .-2 }
-                                  // { dg-message "at offset \\\[6, 8] into destination object 'd'" "note 3" { target *-*-* } .-3 }
-                                  // { dg-message "at offset \\\[7, 8] into destination object 'd'" "note 3" { target *-*-* } .-4 }
+                                  // { dg-message "at offset \\\[6, 8] into destination object 'd'" "note 4" { target *-*-* } .-3 }
+                                  // { dg-message "at offset \\\[7, 8] into destination object 'd'" "note 5" { target *-*-* } .-4 }
 
 void test_5_notes (int i)
 {
index c74ca3a7918beb295baf38e472aec43257167ac3..f49b5ffc636bfc02839a1366b6878feee6fc162d 100644 (file)
@@ -29,7 +29,7 @@ void test_3_notes (int i)
 extern char c[8];                 // { dg-message "at offset \\\[3, 6] into destination object 'c'" "note 1" }
                                   // { dg-message "at offset \\\[4, 7] into destination object 'c'" "note 2" { target *-*-* } .-1 }
                                   // { dg-message "at offset \\\[5, 8] into destination object 'c'" "note 3" { target *-*-* } .-2 }
-                                  // { dg-message "at offset \\\[6, 8] into destination object 'c'" "note 3" { target *-*-* } .-2 }
+                                  // { dg-message "at offset \\\[6, 8] into destination object 'c'" "note 4" { target *-*-* } .-3 }
 
 void test_4_notes (int i)
 {
@@ -50,8 +50,8 @@ void test_4_notes (int i)
 extern char d[8];                 // { dg-message "at offset \\\[3, 6] into destination object 'd'" "note 1" }
                                   // { dg-message "at offset \\\[4, 7] into destination object 'd'" "note 2" { target *-*-* } .-1 }
                                   // { dg-message "at offset \\\[5, 8] into destination object 'd'" "note 3" { target *-*-* } .-2 }
-                                  // { dg-message "at offset \\\[6, 8] into destination object 'd'" "note 3" { target *-*-* } .-3 }
-                                  // { dg-message "at offset \\\[7, 8] into destination object 'd'" "note 3" { target *-*-* } .-4 }
+                                  // { dg-message "at offset \\\[6, 8] into destination object 'd'" "note 4" { target *-*-* } .-3 }
+                                  // { dg-message "at offset \\\[7, 8] into destination object 'd'" "note 5" { target *-*-* } .-4 }
 
 void test_5_notes (int i)
 {