repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
In gcc/testsuite/: 2011-03-04 Nicola Pero <nicola.pero@meta-innovation.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
uninit-16.c
blob
e039f70261ff9c4179d819b1316b52a6e6b9df95
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wuninitialized" } */
3
4
int
foo
,
bar
;
5
6
static
7
void
decode_reloc
(
int
reloc
,
int
*
is_alt
)
8
{
9
if
(
reloc
>=
20
)
10
*
is_alt
=
1
;
11
else if
(
reloc
>=
10
)
12
*
is_alt
=
0
;
13
}
14
15
void
testfunc
()
16
{
17
int
alt_reloc
;
18
19
decode_reloc
(
foo
, &
alt_reloc
);
20
21
if
(
alt_reloc
)
/* { dg-warning "may be used uninitialized" } */
22
bar
=
42
;
23
}