diff options
author | Jeff Law <law@redhat.com> | 2020-01-08 11:46:33 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2020-01-08 11:46:33 -0700 |
commit | 5b18be0b2bfcd9050bce5c456de377f73ee1f314 (patch) | |
tree | 8242b81e81fe6d3a86d6a1f454cebc484f4d22eb | |
parent | 51f902357c56b3b0e5e902d52affcfb844cb541f (diff) | |
download | gcc-5b18be0b2bfcd9050bce5c456de377f73ee1f314.zip gcc-5b18be0b2bfcd9050bce5c456de377f73ee1f314.tar.gz gcc-5b18be0b2bfcd9050bce5c456de377f73ee1f314.tar.bz2 |
* gcc.dg/Wstringop-overflow-27.c: Make testnames unique.
From-SVN: r280016
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Wstringop-overflow-27.c | 8 |
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 537091f..622589e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-01-08 Jeff Law <law@redhat.com> + + * gcc.dg/Wstringop-overflow-27.c: Make testnames unique. + 2020-01-08 Joel Brobecker <brobecker@adacore.com> Olivier Hainque <hainque@adacore.com> diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c index 249ce2b..8e2cfe3 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-27.c @@ -260,8 +260,8 @@ void test_strcpy_warn (const char *s) that the conversion from signed int to size_t doesn't prevent the detection. */ int n = strlen (a); - char *t = (char*)calloc (n, 1); // { dg-message "at offset 0 to an object with size 3 allocated by 'calloc' here" "calloc note" { xfail *-*-* } } - // { dg-message "at offset 0 to an object with size at most 3 allocated by 'calloc' here" "calloc note" { target *-*-* } .-1 } + char *t = (char*)calloc (n, 1); // { dg-message "at offset 0 to an object with size 3 allocated by 'calloc' here" "calloc note 1" { xfail *-*-* } } + // { dg-message "at offset 0 to an object with size at most 3 allocated by 'calloc' here" "calloc note 2" { target *-*-* } .-1 } strcpy (t, a); // { dg-warning "writing 4 bytes into a region of size (between 0 and )?3 " } sink (t); @@ -270,8 +270,8 @@ void test_strcpy_warn (const char *s) { const char a[] = "1234"; size_t n = strlen (a); - char *t = (char*)malloc (n); // { dg-message "at offset 0 to an object with size 4 allocated by 'malloc' here" "malloc note" { xfail *-*-* } } - // { dg-message "at offset 0 to an object with size at most 4 allocated by 'malloc' here" "malloc note" { target *-*-* } .-1 } + char *t = (char*)malloc (n); // { dg-message "at offset 0 to an object with size 4 allocated by 'malloc' here" "malloc note 1" { xfail *-*-* } } + // { dg-message "at offset 0 to an object with size at most 4 allocated by 'malloc' here" "malloc note 2" { target *-*-* } .-1 } strcpy (t, a); // { dg-warning "writing 5 bytes into a region of size (between 0 and )?4 " } sink (t); } |