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
2010-03-31 Martin Jambor <mjambor@suse.cz>
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr33870.c
1
/* { dg-do run } */
2
3
struct X {
4
int i;
5
int a[4];
6
} m;
7
8
int a[4];
9
10
int __attribute__((noinline)) foo(int b)
11
{
12
int (*p)[4] = b ? &a : &m.a;
13
a[3] = 0;
14
(*p)[3] = 1;
15
return (*p)[3] + (*p)[2] + (*p)[1] + a[0] + a[3];
16
}
17
18
extern void abort (void);
19
20
int main()
21
{
22
int i;
23
for (i = 0; i < 4; ++i)
24
a[i] = 0;
25
if (foo(1) != 2)
26
abort ();
27
return 0;
28
}
29