gcc/testsuite/gcc.dg/tree-ssa/pr88029.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O -w -fdump-tree-fre1-vops" } */ |
| 3 | |
| 4 | double foo (double) __attribute__ ((pure)); |
| 5 | double (*fp) (double) __attribute__ ((const)); |
| 6 | double f(double a) |
| 7 | { |
| 8 | fp = foo; |
| 9 | /* Verify when propagating foo to the call we preserve its constness. */ |
| 10 | return fp (a); |
| 11 | } |
| 12 | |
| 13 | /* { dg-final { scan-tree-dump "foo \\(a" "fre1" } } */ |
| 14 | /* { dg-final { scan-tree-dump-times "VUSE" 1 "fre1" } } */ |