In gcc/testsuite/: 2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / uninit-16.c
blobe039f70261ff9c4179d819b1316b52a6e6b9df95
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wuninitialized" } */
4 int foo, bar;
6 static
7 void decode_reloc(int reloc, int *is_alt)
9 if (reloc >= 20)
10 *is_alt = 1;
11 else if (reloc >= 10)
12 *is_alt = 0;
15 void testfunc()
17 int alt_reloc;
19 decode_reloc(foo, &alt_reloc);
21 if (alt_reloc) /* { dg-warning "may be used uninitialized" } */
22 bar = 42;