Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/20021006-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR target/7559 | |
2 This testcase was miscompiled on x86-64 due to wrong access to the struct | |
3 members. */ | |
4 | |
5 extern void abort(); | |
6 | |
7 struct A { | |
8 long x; | |
9 }; | |
10 | |
11 struct R { | |
12 struct A a, b; | |
13 }; | |
14 | |
15 struct R R = { | |
16 {100}, {200} | |
17 }; | |
18 | |
19 void f(struct R r) { | |
20 if (r.a.x != R.a.x || r.b.x != R.b.x) | |
21 abort(); | |
22 } | |
23 | |
24 int main() { | |
25 f(R); | |
26 return 0; | |
27 } |