repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
opt
/
pr30590.C
blob
42ae046db81354a50e9a8bc94055add6499dacac
1
/* { dg-do run } */
2
/* { dg-options "-O" } */
3
struct test
4
{
5
int type;
6
char buffer[4242]; /* should trigger pass-by-reference */
7
};
8
9
int flag = 0;
10
11
struct test
12
reset (void)
13
{
14
struct test retval;
15
retval.type = 1;
16
return retval;
17
}
18
19
struct test
20
test (void)
21
{
22
struct test result;
23
result.type = 0;
24
25
for (int i = 0; i < 2; ++i)
26
{
27
struct test candidate = reset ();
28
if (flag)
29
result = candidate;
30
}
31
32
return result;
33
}
34
35
int
36
main (void)
37
{
38
struct test result = test ();
39
return result.type;
40
}