gcc/testsuite/gcc.target/i386/pr78911-1.c
raw| 1 | /* PR rtl-optimization/78911 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O3 -fno-strict-aliasing -fno-omit-frame-pointer" } */ |
| 4 | /* { dg-additional-options "-fPIC" { target fpic } } */ |
| 5 | /* { dg-additional-options "-march=pentium-m" { target ia32 } } */ |
| 6 | |
| 7 | int a, b, d, e; |
| 8 | long long *c; |
| 9 | |
| 10 | static int |
| 11 | foo (long long *x) |
| 12 | { |
| 13 | return __sync_val_compare_and_swap (x, b, a); |
| 14 | } |
| 15 | |
| 16 | void |
| 17 | bar (void) |
| 18 | { |
| 19 | if (!c) |
| 20 | return; |
| 21 | e = foo (&c[d]); |
| 22 | } |