diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wstringop-overflow-29.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/Wstringop-overflow-29.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.dg/Wstringop-overflow-29.c b/gcc/testsuite/gcc.dg/Wstringop-overflow-29.c index c011d05..f13abbd 100644 --- a/gcc/testsuite/gcc.dg/Wstringop-overflow-29.c +++ b/gcc/testsuite/gcc.dg/Wstringop-overflow-29.c @@ -11,7 +11,7 @@ void sink (void*); void direct_call (void) { - char *q = allocfn (0); // { dg-message "at offset 0 to an object with size 0 allocated by 'allocfn'" } + char *q = allocfn (0); // { dg-message "object of size 0 allocated by 'allocfn'" "note" } q[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" } sink (q); } @@ -20,7 +20,7 @@ void direct_call (void) void local_ptr_call (void) { allocfn_t *ptr = allocfn; - char *q = ptr (1); // { dg-message "at offset -1 to an object with size 1 allocated by 'allocfn'" } + char *q = ptr (1); // { dg-message "at offset -1 into destination object of size 1 allocated by 'allocfn'" "note" } q[0] = 0; q[-1] = 0; // { dg-warning "\\\[-Wstringop-overflow" } sink (q); @@ -32,7 +32,7 @@ void global_ptr_call (void) extern allocfn_t *ptralloc; allocfn_t *ptr = ptralloc; - char *q = ptr (2); // { dg-message "at offset 3 to an object with size 2 allocated by 'ptralloc'" } + char *q = ptr (2); // { dg-message "at offset 3 into destination object of size 2 allocated by 'ptralloc'" "note" } q[0] = 0; q[1] = 1; q[3] = 3; // { dg-warning "\\\[-Wstringop-overflow" } @@ -44,7 +44,7 @@ void global_ptr_array_call (void) extern allocfn_t * (arralloc[]); allocfn_t *ptr = arralloc[0]; - char *q = ptr (2); // { dg-message "at offset 3 to an object with size 2 allocated by 'ptr'" } + char *q = ptr (2); // { dg-message "at offset 3 into destination object of size 2 allocated by 'ptr'" "note" } q[0] = 1; q[1] = 2; q[3] = 3; // { dg-warning "\\\[-Wstringop-overflow" } @@ -56,7 +56,7 @@ struct S { allocfn_t *ptralloc; }; void member_ptr_call (struct S *p) { - char *q = p->ptralloc (3); // { dg-message "at offset 5 to an object with size 3 allocated by 'ptralloc' here" } + char *q = p->ptralloc (3); // { dg-message "at offset 5 into destination object of size 3 allocated by 'ptralloc'" "note" } q[0] = 0; q[1] = 1; q[2] = 2; |