gcc/testsuite/gcc.dg/pr108264.c
raw| 1 | /* PR middle-end/108264 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2" } */ |
| 4 | /* { dg-additional-options "-fpic" { target fpic } } */ |
| 5 | |
| 6 | int v; |
| 7 | extern int bar (void); |
| 8 | |
| 9 | static inline void |
| 10 | foo (char *d) |
| 11 | { |
| 12 | switch (bar ()) |
| 13 | { |
| 14 | case 2: |
| 15 | d[0] = d[1] = d[2] = d[3] = v; |
| 16 | break; |
| 17 | case 4: |
| 18 | d[0] = 0; |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | int |
| 23 | baz (int x) |
| 24 | { |
| 25 | foo ((char *) &x); |
| 26 | return x; |
| 27 | } |