gcc/testsuite/gcc.target/i386/pr92841.c
raw| 1 | /* PR target/92841 */ |
| 2 | /* { dg-do compile { target fstack_protector } } */ |
| 3 | /* { dg-options "-O2 -fstack-protector-strong -masm=att" } */ |
| 4 | /* { dg-final { scan-assembler-not "xor\[lq]\t%(\[re]\[a-z0-9]*), %\\1\[\n\r]*\tmov\[lq]\t\[^\n\r]*, %\\1" } } */ |
| 5 | |
| 6 | const struct S { int b; } c[] = {30, 12, 20, 0, 11}; |
| 7 | void bar (int *); |
| 8 | |
| 9 | void |
| 10 | foo (void) |
| 11 | { |
| 12 | int e[4]; |
| 13 | const struct S *a; |
| 14 | for (a = c; a < c + sizeof (c) / sizeof (c[0]); a++) |
| 15 | if (a->b) |
| 16 | bar (e); |
| 17 | } |