gcc/testsuite/gcc.dg/tree-ssa/pr61839_3.c
raw| 1 | /* PR tree-optimization/61839. */ |
| 2 | /* { dg-do run } */ |
| 3 | /* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-ethread -fdisable-tree-threadfull1" } */ |
| 4 | |
| 5 | __attribute__ ((noinline)) |
| 6 | int foo (int a, unsigned b) |
| 7 | { |
| 8 | int c = 1; |
| 9 | b = a ? 12 : 13; |
| 10 | c = b << 8; |
| 11 | if (c == 3072) |
| 12 | ; |
| 13 | else |
| 14 | __builtin_abort (); |
| 15 | return 0; |
| 16 | } |
| 17 | |
| 18 | int main () |
| 19 | { |
| 20 | volatile unsigned b = 1U; |
| 21 | foo (-1, b); |
| 22 | } |
| 23 | |
| 24 | /* { dg-final { scan-tree-dump-times "3072" 0 "optimized" } } */ |