Commit 51206762 by Roger Sayle Committed by Roger Sayle

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
parent 105d72c5
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> 2006-07-23 Mark Mitchell <mark@codesourcery.com>
PR c++/28025 PR c++/28025
...@@ -24,5 +24,6 @@ _Bool test4(int g, int h) ...@@ -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 "a != 0 \&\& b != 0" 1 "original" } } */
/* { dg-final { scan-tree-dump-times "c == 0 \\|\\| d != 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 "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" } } */ /* { dg-final { cleanup-tree-dump "original" } } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment