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
testsuite: Skip analyzer tests on AIX.
[official-gcc.git]
/
gcc
/
testsuite
/
c-c++-common
/
uninit-17.c
blob
b5495366c5bc20aefdea8e6251fd30f48abf4a98
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wuninitialized -fno-ivopts" } */
3
4
inline
int
foo
(
int
x
)
5
{
6
return
x
;
7
}
8
static void
bar
(
int
a
,
int
*
ptr
)
9
{
10
do
11
{
12
int
b
;
13
if
(
b
<
40
) {
14
ptr
[
0
] =
b
;
15
}
16
b
+=
1
;
/* { dg-warning "is used uninitialized" } */
17
ptr
++;
18
}
19
while
(--
a
!=
0
);
20
}
21
void
foobar
(
int
a
,
int
*
ptr
)
22
{
23
bar
(
foo
(
a
),
ptr
);
24
}
25