Debian Codegraph @

gcc/testsuite/gcc.dg/20021006-1.c

raw
1 /* PR target/7559
2 This testcase was miscompiled on x86-64 due to wrong access to the struct
3 members. */
4 /* { dg-do run } */
5
6 extern void abort(void);
7
8 struct A {
9 long x;
10 };
11
12 struct R {
13 struct A a, b;
14 };
15
16 struct R R = {
17 {100}, {200}
18 };
19
20 void f(struct R r) {
21 if (r.a.x != R.a.x || r.b.x != R.b.x)
22 abort();
23 }
24
25 int main() {
26 f(R);
27 return 0;
28 }