fold-cond-1.c: Increase test case portability by checking that "g ? 1 ...
authorRoger Sayle <roger@eyesopen.com>
Sun, 23 Jul 2006 21:13:07 +0000 (21:13 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sun, 23 Jul 2006 21:13:07 +0000 (21:13 +0000)
* 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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fold-cond-1.c

index c1a42d65aa570bb3ff0b8083a4b757f7151f0f71..310564c6e7994437f9f83aef13c6b03f01de7ad1 100644 (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
index e9212d1ae7b0aa21a4b317c2f100fe289c24fc1d..b6e8a0ec3552226935d7b2adb3db0b2b1665919a 100644 (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" } } */