Fix ICE in substring-handling building 502.gcc_r (PR 87562)
[official-gcc.git] / gcc / testsuite / gcc.dg / pr68671.c
blob9b473ca8f00dd2ea074642bed58b6f6860694c7c
1 /* PR tree-optimization/68671 */
2 /* { dg-do run } */
3 /* { dg-options " -O2 -fno-tree-dce" } */
4 /* { dg-xfail-if "ptxas crashes" { nvptx-*-* } } */
6 volatile int a = -1;
7 volatile int b;
9 static inline int
10 fn1 (signed char p1, int p2)
12 return (p1 < 0) || (p1 > (1 >> p2)) ? 0 : (p1 << 1);
15 int
16 main ()
18 signed char c = a;
19 b = fn1 (c, 1);
20 c = ((128 | c) < 0 ? 1 : 0);
21 if (c != 1)
22 __builtin_abort ();
23 return 0;