gcc/testsuite/gcc.c-torture/execute/pr60062.c
raw| 1 | /* PR target/60062 */ |
| 2 | |
| 3 | int a; |
| 4 | |
| 5 | static void |
| 6 | foo (const char *p1, int p2) |
| 7 | { |
| 8 | if (__builtin_strcmp (p1, "hello") != 0) |
| 9 | __builtin_abort (); |
| 10 | } |
| 11 | |
| 12 | static void |
| 13 | bar (const char *p1) |
| 14 | { |
| 15 | if (__builtin_strcmp (p1, "hello") != 0) |
| 16 | __builtin_abort (); |
| 17 | } |
| 18 | |
| 19 | __attribute__((optimize (0))) int |
| 20 | main () |
| 21 | { |
| 22 | foo ("hello", a); |
| 23 | bar ("hello"); |
| 24 | return 0; |
| 25 | } |