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
This commit is contained in:
Roger Sayle 2006-07-23 21:13:07 +00:00 committed by Roger Sayle
parent 105d72c595
commit 51206762db
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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" } } */