]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr61839_4.c
5c026c89c7d128db00d570c95ef6d222acd01dcc
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr61839_4.c
1 /* PR tree-optimization/61839. */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-optimized" } */
4 /* { dg-require-effective-target int32plus } */
5
6 __attribute__ ((noinline))
7 int foo (int a, unsigned b)
8 {
9 unsigned c = 1;
10 if (b >= 1 && b <= ((unsigned)(-1) - 1))
11 return 0;
12 c = b >> 4;
13 if (c == 268435455)
14 ;
15 else
16 __builtin_abort ();
17 return 0;
18 }
19
20 int main ()
21 {
22 volatile unsigned b = (unsigned)(-1);
23 foo (-1, b);
24 }
25
26 /* Scan for ~[1, 4294967294] >> 4 in function foo. */
27 /* { dg-final { scan-tree-dump-times "0 : 268435455" 1 "vrp1" } } */
28 /* { dg-final { scan-tree-dump-times "268435455" 0 "optimized" } } */