diff options
author | Sam James <sam@gentoo.org> | 2024-10-31 01:37:47 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-10-31 01:41:05 +0000 |
commit | 2dcb174385fd366282bf34bf95adbf918d5befda (patch) | |
tree | 6710dbd69ddeeba87c10f6098e1a2636c713b0ca | |
parent | b60031e8f9f8fe89ec0cb600d0e3dc5b799c825f (diff) | |
download | gcc-2dcb174385fd366282bf34bf95adbf918d5befda.zip gcc-2dcb174385fd366282bf34bf95adbf918d5befda.tar.gz gcc-2dcb174385fd366282bf34bf95adbf918d5befda.tar.bz2 |
testsuite: fix syntax in Wstringop-overflow-59.c
Fix quoting issues, escaping, and dg directive types.
There were two issues here:
1) The incorrect quoting in an earlier dg-message was covering up that the
syntax in the next part was wrong;
2) Fix dg-warning -> dg-message to correctly pick up the notes. Once 1) was
fixed, this was exposed.
With this, I get:
```
+PASS: gcc.dg/Wstringop-overflow-59.c note (test for warnings, line 192)
+PASS: gcc.dg/Wstringop-overflow-59.c note (test for warnings, line 193)
```
gcc/testsuite/ChangeLog:
PR middle-end/92936
* gcc.dg/Wstringop-overflow-59.c: Fix dg-* syntax.
-rw-r--r-- | gcc/testsuite/gcc.dg/Wstringop-overflow-59.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c index b6265e3..88aac3a 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-59.c @@ -172,8 +172,8 @@ void memset_malloc_2_same_size (int i) if (i < 1) i = 1; - char a4_1[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_1" "note" } - char a4_2[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_2" "note" } + char a4_1[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_1'" "note" } + char a4_2[4]; // { dg-message "at offset \\\[1, 4] into destination object 'a4_2'" "note" } char *p4 = cond1 ? a4_1 : a4_2; char *p4_i = p4 + i; @@ -189,8 +189,8 @@ void memset_malloc_2_off (void) int i2 = SR (2, INT_MAX); { - char a5[5]; // { dg-warning "at offset [1, 5] into destination object 'a5' - char a7[7]; // { dg-warning "at offset [2, 7] into destination object 'a7' + char a5[5]; // { dg-message "at offset \\\[1, 5] into destination object 'a5'" "note" } + char a7[7]; // { dg-message "at offset \\\[2, 7] into destination object 'a7'" "note" } char *p5_p1 = a5 + i1; char *p7_p2 = a7 + i2; char *p5_7 = cond1 ? p5_p1 : p7_p2; |