2017-12-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / fold-eqandshift-3.c
blob50978b5b6dc4122a810f5d6dd6ddd7178b161a90
1 /* PR middle-end/29726 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-original" } */
5 void foo (void);
6 #if(__SIZEOF_INT__ >= 4)
7 int test1 (int a)
8 #else
9 int test1 (long a)
10 #endif
13 if ((a >> 3) & 134217728)
14 foo ();
17 #if(__SIZEOF_INT__ >= 4)
18 int test2 (unsigned int b)
19 #else
20 int test2 (unsigned long b)
21 #endif
23 if ((b >> 3) & 134217728)
24 foo ();
27 /* { dg-final { scan-tree-dump-times "\\(a \& 1073741824\\) != 0" 1 "original" } } */
28 /* { dg-final { scan-tree-dump-times "\\(b \& 1073741824\\) != 0" 1 "original" } } */