gcc/testsuite/gcc.dg/vect/pr51590.c
raw| 1 | /* PR middle-end/51590 */ |
| 2 | /* { dg-do compile } */ |
| 3 | |
| 4 | struct S { long a, b; }; |
| 5 | |
| 6 | extern void baz (char *); |
| 7 | |
| 8 | static void |
| 9 | bar (struct S *x) |
| 10 | { |
| 11 | char c[8]; |
| 12 | int i; |
| 13 | |
| 14 | for (i = 0; i < 8; i++) |
| 15 | c[i] = x->a >> ((7 - i) * 8); |
| 16 | |
| 17 | baz (c); |
| 18 | } |
| 19 | |
| 20 | void |
| 21 | foo (const char *x, struct S *y) |
| 22 | { |
| 23 | struct S d = *y; |
| 24 | int i; |
| 25 | |
| 26 | for (i = 0; *x; x++) |
| 27 | i++; |
| 28 | |
| 29 | if (i != 1) |
| 30 | return; |
| 31 | |
| 32 | bar (&d); |
| 33 | } |
| 34 |