diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-10-15 10:19:23 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-10-15 10:21:07 +0200 |
commit | 10744da3452dac48cfa54d4480c269aac56421fa (patch) | |
tree | b97447d32b9ab7a602e99fe41af989922a298a35 /gcc | |
parent | 508e2d88a4c512e8b8685cf5ba201ad48e6bb58d (diff) | |
download | gcc-10744da3452dac48cfa54d4480c269aac56421fa.zip gcc-10744da3452dac48cfa54d4480c269aac56421fa.tar.gz gcc-10744da3452dac48cfa54d4480c269aac56421fa.tar.bz2 |
testsuite: Partially fix up modref-*.c tests
This ia a partial attempt to fix:
FAIL: gcc.dg/ipa/modref-1.c (test for excess errors)
FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 1"
FAIL: gcc.dg/ipa/modref-1.c scan-ipa-dump modref "param offset: 2"
FAIL: gcc.dg/tree-ssa/modref-4.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref1 "param offset: 1"
UNRESOLVED: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref2 "param offset: 2"
UNRESOLVED: gcc.dg/tree-ssa/modref-4.c scan-tree-dump modref2 "return 0"
The return 0 scan still FAILs.
2020-10-15 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/ipa/modref-1.c: Remove space between param offset: and number
in scan-ipa-dump.
(b): Declare return type to void.
(main): Declare return type to int. Change c to array of 3 chars.
* gcc.dg/tree-ssa/modref-4.c: Remove space between param offset: and
number in scan-ipa-dump. Use modref1 instead of modref2.
(b): Declare return type to void.
(main): Declare return type to int. Change c to array of 3 chars.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/modref-1.c | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/modref-4.c | 13 |
2 files changed, 13 insertions, 11 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/modref-1.c b/gcc/testsuite/gcc.dg/ipa/modref-1.c index 46eb78c..858567d 100644 --- a/gcc/testsuite/gcc.dg/ipa/modref-1.c +++ b/gcc/testsuite/gcc.dg/ipa/modref-1.c @@ -8,16 +8,17 @@ void a(char *ptr, char *ptr2) } __attribute__((noinline)) -b(char *ptr) +void b(char *ptr) { a(ptr+1,&ptr[2]); } -main() + +int main() { - char c[2]={0,1,0}; + char c[3]={0,1,0}; b(c); return c[0]+c[2]; } /* Check that both param offsets are determined correctly. */ -/* { dg-final { scan-ipa-dump "param offset: 1" "modref" } } */ -/* { dg-final { scan-ipa-dump "param offset: 2" "modref" } } */ +/* { dg-final { scan-ipa-dump "param offset:1" "modref" } } */ +/* { dg-final { scan-ipa-dump "param offset:2" "modref" } } */ diff --git a/gcc/testsuite/gcc.dg/tree-ssa/modref-4.c b/gcc/testsuite/gcc.dg/tree-ssa/modref-4.c index 776f46e..97fe530 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/modref-4.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/modref-4.c @@ -8,18 +8,19 @@ void a(char *ptr, char *ptr2) } __attribute__((noinline)) -b(char *ptr) +void b(char *ptr) { a(ptr+1,&ptr[2]); } -main() + +int main() { - char c[2]={0,1,0}; + char c[3]={0,1,0}; b(c); return c[0]+c[2]; } /* Check that both param offsets are determined correctly and the computation is optimized out. */ -/* { dg-final { scan-tree-dump "param offset: 1" "modref1" } } */ -/* { dg-final { scan-tree-dump "param offset: 2" "modref2" } } */ -/* { dg-final { scan-tree-dump "return 0" "modref2" } } */ +/* { dg-final { scan-tree-dump "param offset:1" "modref1" } } */ +/* { dg-final { scan-tree-dump "param offset:2" "modref1" } } */ +/* { dg-final { scan-tree-dump "return 0" "modref1" } } */ |