PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr53358.c
blob494090a42df88dd3ecb8fadec00c99a1609f9385
1 /* PR target/53358 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2" } */
4 /* { dg-additional-options "-fpic" { target fpic } } */
5 /* { dg-additional-options "-mtune=pentium4" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
7 struct S { unsigned char s, t[17]; };
8 int bar (void);
10 void
11 foo (struct S *x)
13 unsigned char i, z;
14 if (bar ())
16 z = bar ();
17 bar ();
18 x->s += z;
19 for (i = 0; i < x->s; i++)
20 x->t[i] = bar ();