OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix PR45121
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
c-c++-common
/
uninit-17.c
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -Wuninitialized" } */
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; /* { dg-message "declared" } */
13
if (b < 40) {
14
ptr[0] = b; /* { dg-warning "may be used uninitialized" } */
15
}
16
b += 1;
17
ptr++;
18
}
19
while (--a != 0);
20
}
21
void foobar(int a, int *ptr)
22
{
23
bar(foo(a), ptr);
24
}
25