gcc/testsuite/gcc.dg/lto/pr50199_0.c
raw| 1 | /* PR middle-end/50199 */ |
| 2 | /* { dg-lto-options {{-O2 -flto -fno-merge-constants --param=lto-min-partition=1}} } */ |
| 3 | |
| 4 | __attribute__ ((noinline)) const char * |
| 5 | foo (const char *x) |
| 6 | { |
| 7 | return x; |
| 8 | } |
| 9 | |
| 10 | int |
| 11 | main () |
| 12 | { |
| 13 | const char *a = "ab"; |
| 14 | if (a != foo (a)) |
| 15 | __builtin_abort (); |
| 16 | return 0; |
| 17 | } |