comparison gcc/testsuite/g++.target/arm/no_unique_address_1.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
18:1830386684a0 19:2b5abeee2509
1 /* { dg-require-effective-target arm_arch_v8a_hard_ok } */
2 /* { dg-options "-std=c++11 -O -foptimize-sibling-calls" } */
3 /* { dg-add-options arm_arch_v8a_hard } */
4 /* { dg-final { check-function-bodies "**" "" "" } } */
5
6 struct X { };
7 struct Y { int : 0; };
8 struct Z { int : 0; Y y; };
9 struct W : public X { X q; };
10
11 struct A { float a; };
12
13 struct B : public X { float a; };
14 struct C : public Y { float a; };
15 struct D : public Z { float a; };
16 struct E : public W { float a; };
17
18 struct F { [[no_unique_address]] X x; float a; };
19 struct G { [[no_unique_address]] Y y; float a; };
20 struct H { [[no_unique_address]] Z z; float a; };
21 struct I { [[no_unique_address]] W w; float a; };
22
23 struct J { float a; [[no_unique_address]] X x; float b; };
24 struct K { float a; [[no_unique_address]] Y y; float b; };
25 struct L { float a; [[no_unique_address]] Z z; float b; };
26 struct M { float a; [[no_unique_address]] W w; float b; };
27
28 struct N : public A { float b; };
29 struct O { [[no_unique_address]] A a; float b; };
30
31 struct P : public Y { int : 0; float a, b, c, d; };
32
33 union Q { X x; float a; };
34 union R { [[no_unique_address]] X x; float a; };
35
36 union S { A a; float b; };
37 union T { F f; float b; };
38 union U { N n; O o; };
39
40 typedef S Salias;
41 typedef T Talias;
42 typedef U Ualias;
43
44 #define T(S, s) extern int callee_##s (S)
45
46 /*
47 ** _Z8caller_aR1A:
48 ** vldr.32 s0, \[r0\]
49 ** b .*
50 */
51 T (A, a); int caller_a (A &a) { return callee_a (a); } /* { dg-bogus {argument of type 'A'} } */
52
53 /*
54 ** _Z8caller_bR1B:
55 ** vldr.32 s0, \[r0\]
56 ** b .*
57 */
58 T (B, b); int caller_b (B &b) { return callee_b (b); } /* { dg-bogus {argument of type 'B'} } */
59
60 /*
61 ** _Z8caller_cR1C:
62 ** vldr.32 s0, \[r0\]
63 ** b .*
64 */
65 T (C, c); int caller_c (C &c) { return callee_c (c); } /* { dg-bogus {argument of type 'C'} } */
66
67 /*
68 ** _Z8caller_dR1D:
69 ** ldm r0, {r0, r1}
70 ** b .*
71 */
72 T (D, d); int caller_d (D &d) { return callee_d (d); } /* { dg-bogus {argument of type 'D'} } */
73
74 /*
75 ** _Z8caller_eR1E:
76 ** ldm r0, {r0, r1}
77 ** b .*
78 */
79 T (E, e); int caller_e (E &e) { return callee_e (e); } /* { dg-bogus {argument of type 'E'} } */
80
81 /*
82 ** _Z8caller_fR1F:
83 ** vldr.32 s0, \[r0\]
84 ** b .*
85 */
86 T (F, f); int caller_f (F &f) { return callee_f (f); } /* { dg-message {parameter passing for argument of type 'F' with '\[\[no_unique_address\]\]' members changed in GCC 10.1} } */
87
88 /*
89 ** _Z8caller_gR1G:
90 ** vldr.32 s0, \[r0\]
91 ** b .*
92 */
93 T (G, g); int caller_g (G &g) { return callee_g (g); } /* { dg-message {parameter passing for argument of type 'G' with '\[\[no_unique_address\]\]' members changed in GCC 10.1} } */
94
95 /*
96 ** _Z8caller_hR1H:
97 ** ldm r0, {r0, r1}
98 ** b .*
99 */
100 T (H, h); int caller_h (H &h) { return callee_h (h); } /* { dg-bogus {argument of type 'H'} } */
101
102 /*
103 ** _Z8caller_iR1I:
104 ** ldm r0, {r0, r1}
105 ** b .*
106 */
107 T (I, i); int caller_i (I &i) { return callee_i (i); } /* { dg-bogus {argument of type 'I'} } */
108
109 /*
110 ** _Z8caller_jR1J:
111 ** vldr.32 s0, \[r0\]
112 ** vldr.32 s1, \[r0, #4\]
113 ** b .*
114 */
115 T (J, j); int caller_j (J &j) { return callee_j (j); } /* { dg-message {parameter passing for argument of type 'J' with '\[\[no_unique_address\]\]' members changed in GCC 10.1} } */
116
117 /*
118 ** _Z8caller_kR1K:
119 ** vldr.32 s0, \[r0\]
120 ** vldr.32 s1, \[r0, #4\]
121 ** b .*
122 */
123 T (K, k); int caller_k (K &k) { return callee_k (k); } /* { dg-message {parameter passing for argument of type 'K' with '\[\[no_unique_address\]\]' members changed in GCC 10.1} } */
124
125 /*
126 ** _Z8caller_lR1L:
127 ** ldm r0, {r0, r1, r2}
128 ** b .*
129 */
130 T (L, l); int caller_l (L &l) { return callee_l (l); } /* { dg-bogus {argument of type 'L'} } */
131
132 /*
133 ** _Z8caller_mR1M:
134 ** ldm r0, {r0, r1, r2}
135 ** b .*
136 */
137 T (M, m); int caller_m (M &m) { return callee_m (m); } /* { dg-bogus {argument of type 'M'} } */
138
139 /*
140 ** _Z8caller_nR1N:
141 ** vldr.32 s0, \[r0\]
142 ** vldr.32 s1, \[r0, #4\]
143 ** b .*
144 */
145 T (N, n); int caller_n (N &n) { return callee_n (n); } /* { dg-bogus {argument of type 'N'} } */
146
147 /*
148 ** _Z8caller_oR1O:
149 ** vldr.32 s0, \[r0\]
150 ** vldr.32 s1, \[r0, #4\]
151 ** b .*
152 */
153 T (O, o); int caller_o (O &o) { return callee_o (o); } /* { dg-bogus {argument of type 'O'} } */
154
155 /*
156 ** _Z8caller_pR1P:
157 ** vldr.32 s0, \[r0\]
158 ** vldr.32 s1, \[r0, #4\]
159 ** vldr.32 s2, \[r0, #8\]
160 ** vldr.32 s3, \[r0, #12\]
161 ** b .*
162 */
163 T (P, p); int caller_p (P &p) { return callee_p (p); } /* { dg-bogus {argument of type 'P'} } */
164
165 /*
166 ** _Z8caller_qR1Q:
167 ** ldr r0, \[r0\]
168 ** b .*
169 */
170 T (Q, q); int caller_q (Q &q) { return callee_q (q); } /* { dg-bogus {argument of type 'Q'} } */
171
172 /*
173 ** _Z8caller_rR1R:
174 ** ldr r0, \[r0\]
175 ** b .*
176 */
177 T (R, r); int caller_r (R &r) { return callee_r (r); } /* { dg-bogus {argument of type 'R'} } */
178
179 /*
180 ** _Z8caller_sR1S:
181 ** vldr.32 s0, \[r0\] @ int
182 ** b .*
183 */
184 T (Salias, s); int caller_s (Salias &s) { return callee_s (s); } /* { dg-bogus {argument of type 'S'} } */
185
186 /*
187 ** _Z8caller_tR1T:
188 ** vldr.32 s0, \[r0\] @ int
189 ** b .*
190 */
191 T (Talias, t); int caller_t (Talias &t) { return callee_t (t); } /* { dg-message {parameter passing for argument of type 'T' with '\[\[no_unique_address\]\]' members changed in GCC 10.1} } */
192
193 /*
194 ** _Z8caller_uR1U:
195 ** vldr.32 s0, \[r0\]
196 ** vldr.32 s1, \[r0, #4\]
197 ** b .*
198 */
199 T (Ualias, u); int caller_u (Ualias &u) { return callee_u (u); } /* { dg-bogus {argument of type 'U'} } */
200
201 /* { dg-bogus {argument of type 'const} "should not be printed as const" { target *-*-*} 0 } */