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
Merged r158704 through r158906 into branch.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
uninit-pred-loop-1_c.cc
blob
7f6b41d31ff371e072c997eb9f87b37936e6dabb
1
/* { dg-do compile } */
2
/* { dg-options "-Wuninitialized -O2" } */
3
4
extern
int
bar
();
5
int
foo
(
int
n
,
int
m
)
6
{
7
for
(;;) {
8
int
err
= ({
int
_err
;
9
for
(
int
i
=
0
;
i
<
16
; ++
i
) {
10
if
(
m
+
i
>
n
)
11
break
;
12
_err
=
17
;
13
_err
=
bar
();
14
}
15
_err
;
16
});
17
18
if
(
err
==
0
)
return
17
; });
/* { dg-warning "uninitialized" "warn on _err" } */
19
}
20
21
return
18
;
22
}
23