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
2013-10-21 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr55253.c
blob
9f6491d4ca4d7fa1211e647df5c7ca3d29cbb004
1
/* { dg-do run } */
2
3
struct
4
{
5
int
mallocFailed
;
6
}
7
*
a
;
8
9
struct
StrAccum
10
{
11
int
useMalloc
;
12
}
13
b
,
c
;
14
15
static void
16
fn1
(
struct
StrAccum
*
p1
,
int
p2
)
17
{
18
if
(
p2
==
0
)
19
return
;
20
if
(
p1
->
useMalloc
)
21
a
->
mallocFailed
=
0
;
22
}
23
24
void
25
fn2
(
struct
StrAccum
*
p1
)
26
{
27
fn1
(
p1
,
1
);
28
}
29
30
void
31
fn3
(
struct
StrAccum
*
p1
)
32
{
33
fn1
(
p1
,
1
);
34
}
35
36
void
37
fn4
()
38
{
39
c
.
useMalloc
=
1
;
40
fn1
(&
c
,
0
);
41
}
42
43
int
44
main
()
45
{
46
fn3
(&
b
);
47
return
0
;
48
}