diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-02-25 09:05:57 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-02-25 09:05:57 +0100 |
commit | 103bc4db7665a03bf2390ccc8ceca0dc5a7a81b7 (patch) | |
tree | 79cefa33fb6642c6faf6ec1626ac1f789ba7a7c6 /gcc | |
parent | 7b60f3ba7660ad8697843ed8d0198449b9ea0a90 (diff) | |
download | gcc-103bc4db7665a03bf2390ccc8ceca0dc5a7a81b7.zip gcc-103bc4db7665a03bf2390ccc8ceca0dc5a7a81b7.tar.gz gcc-103bc4db7665a03bf2390ccc8ceca0dc5a7a81b7.tar.bz2 |
testsuite: Fix recently added ipa testcases [PR93763]
Seems the test has been badly reduced (if the original doesn't emit
warnings, it is always better in the reduction script avoid introducing new
ones).
Also, the g++.dg/ipa/ test fails with -std=c++98 because it is written in
C++11.
2020-02-25 Jakub Jelinek <jakub@redhat.com>
PR ipa/93763
* gcc.dg/ipa/pr93763.c: Adjust the test so that it compiles without
warnings and still ICEs before the ipa-cp.c fix.
* g++.dg/ipa/pr93763.C: Require c++11 effective target.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/ipa/pr93763.C | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/pr93763.c | 28 |
3 files changed, 22 insertions, 13 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fca49c3..153e4ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2020-02-25 Jakub Jelinek <jakub@redhat.com> + PR ipa/93763 + * gcc.dg/ipa/pr93763.c: Adjust the test so that it compiles without + warnings and still ICEs before the ipa-cp.c fix. + * g++.dg/ipa/pr93763.C: Require c++11 effective target. + PR translation/93864 * objc.dg/encode-2.m: Fix comment typo paramter -> parameter. * obj-c++.dg/encode-4.mm: Likewise. diff --git a/gcc/testsuite/g++.dg/ipa/pr93763.C b/gcc/testsuite/g++.dg/ipa/pr93763.C index 6111710..13ab2d5 100644 --- a/gcc/testsuite/g++.dg/ipa/pr93763.C +++ b/gcc/testsuite/g++.dg/ipa/pr93763.C @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do compile { target c++11 } } */ /* { dg-options "-O3" } */ struct search_param { diff --git a/gcc/testsuite/gcc.dg/ipa/pr93763.c b/gcc/testsuite/gcc.dg/ipa/pr93763.c index d117059..aa2e60c 100644 --- a/gcc/testsuite/gcc.dg/ipa/pr93763.c +++ b/gcc/testsuite/gcc.dg/ipa/pr93763.c @@ -3,44 +3,48 @@ typedef struct a a; struct a { - a *b + a *b; } d; -e, k, ah, al; -f(aa) { +int e, k, ah, al; +void h(void); +void +f(aa) int aa; { if (aa & 1) goto g; f(aa | 2); g: h(); } +void i(); +void l() { - { f(072); i(e, d, 92); - } } +void ag() { - { i(e, d, 36); } + i(e, d, 36); } +void j(); +void ai(a *m, a *n, unsigned aa) { f(aa); j(k, l, ah, 1); } +void j(int c, a m, int aj, int aa) { int ak = aa; - { i(e, d, ak); } + i(e, d, ak); } +void i(int c, a *m, unsigned aa) { - { - { i(c, (*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*( + i(c, (*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*( *(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*( *(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*(*m).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b) .b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b) .b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b) .b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b) .b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b).b, 0); - } - } int am = aa; - ai(ag, al, am); + ai((a *) (void *) ag, (a *) (__INTPTR_TYPE__) al, am); } |