PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pr61839_3.c
blob5ceb0738bded19adfcbd5ba6e02c8060f7818804
1 /* PR tree-optimization/61839. */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-optimized" } */
5 __attribute__ ((noinline))
6 int foo (int a, unsigned b)
8 int c = 1;
9 b = a ? 12 : 13;
10 c = b << 8;
11 if (c == 3072)
13 else
14 __builtin_abort ();
15 return 0;
18 int main ()
20 volatile unsigned b = 1U;
21 foo (-1, b);
24 /* Scan for c [12, 13] << 8 in function foo. */
25 /* { dg-final { scan-tree-dump-times "3072 : 3328" 2 "vrp1" } } */
26 /* { dg-final { scan-tree-dump-times "3072" 0 "optimized" } } */