Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git] / gcc / testsuite / gcc.dg / pr89061.c
blob6b5d913401ef786a5eee9f182f339f8bbc259f56
1 /* PR c/89061 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wjump-misses-init" } */
5 struct S { int s; };
7 int
8 foo (int x)
10 struct S s = { 0 };
11 if ((s.s = x) == 0)
12 goto cleanup; /* { dg-bogus "jump skips variable initialization" } */
13 s = (struct S) { .s = 42 };
14 cleanup:
15 return s.s;
18 int
19 bar (int x)
21 struct S *s = &(struct S) { 0 };
22 if ((s->s = x) == 0)
23 goto cleanup; /* { dg-bogus "jump skips variable initialization" } */
24 s = &(struct S) { .s = 42 };
25 cleanup:
26 return s->s;