diff options
author | Roger Sayle <roger@eyesopen.com> | 2006-07-23 21:13:07 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-07-23 21:13:07 +0000 |
commit | 51206762dbbd57a1541ad58ade0eb90bcdf4a15f (patch) | |
tree | ea8e5814641977f980483af9d77b093f88b7e885 | |
parent | 105d72c5950000e4215865bd2acef5e963a608dc (diff) | |
download | gcc-51206762dbbd57a1541ad58ade0eb90bcdf4a15f.zip gcc-51206762dbbd57a1541ad58ade0eb90bcdf4a15f.tar.gz gcc-51206762dbbd57a1541ad58ade0eb90bcdf4a15f.tar.bz2 |
fold-cond-1.c: Increase test case portability by checking that "g ? 1 ...
* gcc.dg/fold-cond-1.c: Increase test case portability by checking
that "g ? 1 : h" doesn't match, instead of checking for "(g | h) != 0"
which may be transformed to "g || h" on some platforms.
From-SVN: r115691
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/fold-cond-1.c | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c1a42d6..310564c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2006-07-23 Roger Sayle <roger@eyesopen.com> + + * gcc.dg/fold-cond-1.c: Increase test case portability by checking + that "g ? 1 : h" doesn't match, instead of checking for "(g | h) != 0" + which may be transformed to "g || h" on some platforms. + 2006-07-23 Mark Mitchell <mark@codesourcery.com> PR c++/28025 diff --git a/gcc/testsuite/gcc.dg/fold-cond-1.c b/gcc/testsuite/gcc.dg/fold-cond-1.c index e9212d1..b6e8a0e 100644 --- a/gcc/testsuite/gcc.dg/fold-cond-1.c +++ b/gcc/testsuite/gcc.dg/fold-cond-1.c @@ -24,5 +24,6 @@ _Bool test4(int g, int h) /* { dg-final { scan-tree-dump-times "a != 0 \&\& b != 0" 1 "original" } } */ /* { dg-final { scan-tree-dump-times "c == 0 \\|\\| d != 0" 1 "original" } } */ /* { dg-final { scan-tree-dump-times "e == 0 \&\& f != 0" 1 "original" } } */ -/* { dg-final { scan-tree-dump-times "\\(g \\| h\\) != 0" 1 "original" } } */ +/* { dg-final { scan-tree-dump-times "g == 0 \\? h != 0 : 1" 0 "original" } } */ +/* { dg-final { scan-tree-dump-times "g != 0 \\? 1 : h != 0" 0 "original" } } */ /* { dg-final { cleanup-tree-dump "original" } } */ |