Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr64309.c
blob0a3a009aaf59894951d52fd58f9fcc987e485973
1 /* PR middle-end/64309 */
2 /* { dg-do run } */
3 /* { dg-options "-fdump-tree-original" } */
5 int
6 fn1 (int n)
8 return ((1 << n) & 1) != 0;
11 int
12 fn2 (int n)
14 return (1 & (1 << n)) != 0;
17 int
18 fn3 (int n)
20 return ((1 << n) & 1) == 0;
23 int
24 fn4 (int n)
26 return (1 & (1 << n)) == 0;
29 int
30 main (void)
32 if (fn1 (0) != 1
33 || fn1 (1) != 0
34 || fn1 (2) != 0
35 || fn1 (3) != 0
36 || fn1 (4) != 0
37 || fn1 (5) != 0)
38 __builtin_abort ();
40 if (fn2 (0) != 1
41 || fn2 (1) != 0
42 || fn2 (2) != 0
43 || fn2 (3) != 0
44 || fn2 (4) != 0
45 || fn2 (5) != 0)
46 __builtin_abort ();
48 if (fn3 (0) != 0
49 || fn3 (1) != 1
50 || fn3 (2) != 1
51 || fn3 (3) != 1
52 || fn3 (4) != 1
53 || fn3 (5) != 1)
54 __builtin_abort ();
56 if (fn4 (0) != 0
57 || fn4 (1) != 1
58 || fn4 (2) != 1
59 || fn4 (3) != 1
60 || fn4 (4) != 1
61 || fn4 (5) != 1)
62 __builtin_abort ();
65 /* { dg-final { scan-tree-dump-not "(<<|>>)" "original" } } */