145
|
1 // PR c++/92384
|
|
2 // { dg-do run }
|
|
3
|
|
4 struct S {};
|
|
5 struct T : public S { S a, b, c, d, e, f, g, h, i, j, k, l, m; };
|
|
6 struct U { long long a, b, c; };
|
|
7
|
|
8 U
|
|
9 foo (S, S, S, T, T, T, U g)
|
|
10 {
|
|
11 return g;
|
|
12 }
|
|
13
|
|
14 __attribute__((noipa)) bool
|
|
15 bar (S a, S b, S c, T d, T e, T f, U g, void **h)
|
|
16 {
|
|
17 h[0] = (void *) &a;
|
|
18 h[1] = (void *) &b;
|
|
19 h[2] = (void *) &c;
|
|
20 h[3] = (void *) &d;
|
|
21 h[4] = (void *) &e;
|
|
22 h[5] = (void *) &f;
|
|
23 h[6] = (void *) &g;
|
|
24 asm volatile ("" : : "r" (h) : "memory");
|
|
25 return (h[0] != h[1] && h[1] != h[2] && h[2] != h[3]
|
|
26 && h[3] != h[4] && h[4] != h[5] && h[5] != h[6]);
|
|
27 }
|
|
28
|
|
29 int
|
|
30 main ()
|
|
31 {
|
|
32 S a;
|
|
33 T b;
|
|
34 U c = { 1, 2, 3 };
|
|
35 void *d[7];
|
|
36 if (!bar (a, a, a, b, b, b, c, d))
|
|
37 __builtin_abort ();
|
|
38 }
|