builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr45083.c
blobc9a4dbfe19124d8e4d2c6b322e18ea397f8fe9d1
1 /* PR tree-optimization/45083 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -Wuninitialized" } */
5 struct S { char *a; unsigned b; unsigned c; };
6 extern int foo (const char *);
7 extern void bar (int, int);
9 static void
10 baz (void)
12 struct S cs[1]; /* { dg-message "was declared here" } */
13 switch (cs->b) /* { dg-warning "cs\[^\n\r\]*\\.b\[^\n\r\]*is used uninitialized" } */
15 case 101:
16 if (foo (cs->a)) /* { dg-warning "cs\[^\n\r\]*\\.a\[^\n\r\]*may be used uninitialized" } */
17 bar (cs->c, cs->b); /* { dg-warning "cs\[^\n\r\]*\\.c\[^\n\r\]*may be used uninitialized" } */
21 void
22 test (void)
24 baz ();