* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / Wunreachable-2.c
blob8242441b0be6f193ef84dccf3f3d41cecbc4b724
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wunreachable-code" } */
4 extern int foo (const char *);
5 extern void baz (void);
6 const char *a[] = { "one", "two" };
8 void bar (void)
10 int i;
12 for (i = 0; i < 2; i++)
13 if (! foo (a[i]))
14 return;
16 baz (); /* { dg-bogus "will never be executed" } */
17 baz ();
18 baz ();