Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Commit bd3329a

Browse files
committed
Add fn spec flags for all library functions.
1 parent 423c4ab commit bd3329a

File tree

5 files changed

+99
-66
lines changed

5 files changed

+99
-66
lines changed

gcc/d/ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2018-02-12 Iain Buclaw <ibuclaw@gdcproject.org>
2+
3+
* runtime.cc (build_libcall_decl): Update signature, handle "fn spec"
4+
attribute.
5+
* runtime.def (DEF_D_RUNTIME): Add fnspec argument. All callers
6+
updated.
7+
18
2018-02-11 Iain Buclaw <ibuclaw@gdcproject.org>
29

310
* runtime.def (DYNAMIC_CAST, INTERFACE_CAST): Set ECF_CONST.

gcc/d/d-tree.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ extern GTY(()) tree d_global_trees[DTI_MAX];
453453

454454
enum libcall_fn
455455
{
456-
#define DEF_D_RUNTIME(CODE, N, T, P, F) LIBCALL_ ## CODE,
456+
#define DEF_D_RUNTIME(CODE, N, T, P, F, S) LIBCALL_ ## CODE,
457457

458458
#include "runtime.def"
459459

gcc/d/runtime.cc

+14-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
2525
#include "tree.h"
2626
#include "fold-const.h"
2727
#include "stringpool.h"
28+
#include "attribs.h"
2829

2930
#include "d-tree.h"
3031
#include "d-frontend.h"
@@ -214,7 +215,7 @@ get_libcall_type (libcall_type type)
214215

215216
static tree
216217
build_libcall_decl (const char *name, libcall_type return_type,
217-
int flags, int nparams, ...)
218+
int flags, const char *fnspec, int nparams, ...)
218219
{
219220
tree *args = XALLOCAVEC (tree, nparams);
220221
bool varargs = false;
@@ -248,6 +249,15 @@ build_libcall_decl (const char *name, libcall_type return_type,
248249
else
249250
fntype = build_function_type_array (tret, nparams, args);
250251

252+
if (fnspec)
253+
{
254+
tree attr_args = build_tree_list (NULL_TREE,
255+
build_string (strlen (fnspec), fnspec));
256+
tree attrs = tree_cons (get_identifier ("fn spec"),
257+
attr_args, TYPE_ATTRIBUTES (fntype));
258+
fntype = build_type_attribute_variant (fntype, attrs);
259+
}
260+
251261
tree decl = build_decl (UNKNOWN_LOCATION, FUNCTION_DECL,
252262
get_identifier (name), fntype);
253263
DECL_EXTERNAL (decl) = 1;
@@ -276,9 +286,10 @@ get_libcall (libcall_fn libcall)
276286

277287
switch (libcall)
278288
{
279-
#define DEF_D_RUNTIME(CODE, NAME, TYPE, PARAMS, FLAGS) \
289+
#define DEF_D_RUNTIME(CODE, NAME, TYPE, PARAMS, FLAGS, FNSPEC) \
280290
case LIBCALL_ ## CODE: \
281-
libcall_decls[libcall] = build_libcall_decl (NAME, TYPE, FLAGS, PARAMS); \
291+
libcall_decls[libcall] = build_libcall_decl (NAME, TYPE, FLAGS, FNSPEC, \
292+
PARAMS); \
282293
break;
283294

284295
#include "runtime.def"

gcc/d/runtime.def

+76-61
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ along with GCC; see the file COPYING3. If not see
1717

1818
/* D runtime library functions. */
1919

20-
/* DEF_D_RUNTIME (CODE, NAME, FLAGS)
20+
/* DEF_D_RUNTIME (CODE, NAME, FLAGS, FNSPEC)
2121
CODE The enum code used to refer this function.
2222
NAME The name of this function as a string.
2323
FLAGS ECF flags to describe attributes of the function.
24+
FNSPEC A string describing the functions fnspec.
2425

2526
Used for declaring functions that are called by generated code. Most are
2627
extern(C) - for those that are not, ensure to use correct mangling. */
@@ -35,193 +36,207 @@ along with GCC; see the file COPYING3. If not see
3536

3637
/* Used when an assert() contract fails. */
3738
DEF_D_RUNTIME (ASSERT, "_d_assert", RT(VOID), P2(STRING, UINT),
38-
ECF_COLD | ECF_LEAF | ECF_NORETURN)
39+
ECF_COLD | ECF_LEAF | ECF_NORETURN, ".RR")
3940
DEF_D_RUNTIME (ASSERT_MSG, "_d_assert_msg", RT(VOID), P3(STRING, STRING, UINT),
40-
ECF_COLD | ECF_LEAF | ECF_NORETURN)
41+
ECF_COLD | ECF_LEAF | ECF_NORETURN, ".RRR")
4142

4243
/* Used when an assert() contract fails in a unittest function. */
4344
DEF_D_RUNTIME (UNITTEST, "_d_unittest", RT(VOID), P2(STRING, UINT),
44-
ECF_COLD | ECF_LEAF | ECF_NORETURN)
45+
ECF_COLD | ECF_LEAF | ECF_NORETURN, ".RR")
4546
DEF_D_RUNTIME (UNITTEST_MSG, "_d_unittest_msg", RT(VOID),
46-
P3(STRING, STRING, UINT), ECF_COLD | ECF_LEAF | ECF_NORETURN)
47+
P3(STRING, STRING, UINT),
48+
ECF_COLD | ECF_LEAF | ECF_NORETURN, ".RRR")
4749

4850
/* Used when an array index outside the bounds of its range. */
4951
DEF_D_RUNTIME (ARRAY_BOUNDS, "_d_arraybounds", RT(VOID), P2(STRING, UINT),
50-
ECF_COLD | ECF_LEAF | ECF_NORETURN)
52+
ECF_COLD | ECF_LEAF | ECF_NORETURN, ".RR")
5153

5254
/* Used when calling new on a class. */
5355
DEF_D_RUNTIME (NEWCLASS, "_d_newclass", RT(OBJECT), P1(CONST_CLASSINFO),
54-
ECF_LEAF)
56+
ECF_LEAF, ".R")
5557

5658
/* Used when calling delete on a class or interface. */
57-
DEF_D_RUNTIME (DELCLASS, "_d_delclass", RT(VOID), P1(VOIDPTR), 0)
58-
DEF_D_RUNTIME (DELINTERFACE, "_d_delinterface", RT(VOID), P1(VOIDPTR), 0)
59+
DEF_D_RUNTIME (DELCLASS, "_d_delclass", RT(VOID), P1(VOIDPTR),
60+
0, ".w")
61+
DEF_D_RUNTIME (DELINTERFACE, "_d_delinterface", RT(VOID), P1(VOIDPTR),
62+
0, ".w")
5963

6064
/* Same as deleting a class, but used for stack-allocated classes. */
61-
DEF_D_RUNTIME (CALLFINALIZER, "_d_callfinalizer", RT(VOID), P1(VOIDPTR), 0)
65+
DEF_D_RUNTIME (CALLFINALIZER, "_d_callfinalizer", RT(VOID), P1(VOIDPTR),
66+
0, ".w")
6267
DEF_D_RUNTIME (CALLINTERFACEFINALIZER, "_d_callinterfacefinalizer", RT(VOID),
63-
P1(VOIDPTR), 0)
68+
P1(VOIDPTR), 0, ".w")
6469

6570
/* Used for casting to a class or interface. */
6671
DEF_D_RUNTIME (DYNAMIC_CAST, "_d_dynamic_cast", RT(OBJECT),
67-
P2(OBJECT, CLASSINFO), ECF_CONST | ECF_LEAF)
72+
P2(OBJECT, CLASSINFO), ECF_CONST | ECF_LEAF, ".rR")
6873
DEF_D_RUNTIME (INTERFACE_CAST, "_d_interface_cast", RT(OBJECT),
69-
P2(OBJECT, CLASSINFO), ECF_CONST | ECF_LEAF)
74+
P2(OBJECT, CLASSINFO), ECF_CONST | ECF_LEAF, ".rR")
7075

7176
/* Used when calling new on a pointer. The `i' variant is for when the
7277
initialiser is non-zero. */
7378
DEF_D_RUNTIME (NEWITEMT, "_d_newitemT", RT(VOIDPTR), P1(CONST_TYPEINFO),
74-
ECF_LEAF)
79+
ECF_LEAF, ".R")
7580
DEF_D_RUNTIME (NEWITEMIT, "_d_newitemiT", RT(VOIDPTR), P1(CONST_TYPEINFO),
76-
ECF_LEAF)
81+
ECF_LEAF, ".R")
7782

7883
/* Used when calling delete on a pointer. */
7984
DEF_D_RUNTIME (DELMEMORY, "_d_delmemory", RT(VOID), P1(POINTER_VOIDPTR),
80-
ECF_LEAF)
85+
ECF_LEAF, ".w")
8186
DEF_D_RUNTIME (DELSTRUCT, "_d_delstruct", RT(VOID),
82-
P2(POINTER_VOIDPTR, TYPEINFO), 0)
87+
P2(POINTER_VOIDPTR, TYPEINFO), 0, ".wR")
8388

8489
/* Used when calling new on an array. The `i' variant is for when the
8590
initialiser is non-zero, and the `m' variant is when initialising a
8691
multi-dimensional array. */
8792
DEF_D_RUNTIME (NEWARRAYT, "_d_newarrayT", RT(ARRAY_VOID),
88-
P2(CONST_TYPEINFO, SIZE_T), ECF_LEAF)
93+
P2(CONST_TYPEINFO, SIZE_T), ECF_LEAF, "mRR")
8994
DEF_D_RUNTIME (NEWARRAYIT, "_d_newarrayiT", RT(ARRAY_VOID),
90-
P2(CONST_TYPEINFO, SIZE_T), ECF_LEAF)
95+
P2(CONST_TYPEINFO, SIZE_T), ECF_LEAF, "mRR")
9196
DEF_D_RUNTIME (NEWARRAYMTX, "_d_newarraymTX", RT(ARRAY_VOID),
92-
P2(CONST_TYPEINFO, ARRAY_SIZE_T), ECF_LEAF)
97+
P2(CONST_TYPEINFO, ARRAY_SIZE_T), ECF_LEAF, "mRR")
9398
DEF_D_RUNTIME (NEWARRAYMITX, "_d_newarraymiTX", RT(ARRAY_VOID),
94-
P2(CONST_TYPEINFO, ARRAY_SIZE_T), ECF_LEAF)
99+
P2(CONST_TYPEINFO, ARRAY_SIZE_T), ECF_LEAF, "mRR")
95100

96101
/* Used for allocating an array literal on the GC heap. */
97102
DEF_D_RUNTIME (ARRAYLITERALTX, "_d_arrayliteralTX", RT(VOIDPTR),
98-
P2(CONST_TYPEINFO, SIZE_T), ECF_LEAF)
103+
P2(CONST_TYPEINFO, SIZE_T), ECF_LEAF, ".RR")
99104

100105
/* Used when calling delete on an array. */
101106
DEF_D_RUNTIME (DELARRAYT, "_d_delarray_t", RT(VOID),
102-
P2(ARRAYPTR_VOID, CONST_TYPEINFO), 0)
107+
P2(ARRAYPTR_VOID, CONST_TYPEINFO), 0, ".wR")
103108

104109
/* Used for value equality (x == y) and comparisons (x < y) of non-trivial
105110
arrays. Such as an array of structs or classes. */
106111
DEF_D_RUNTIME (ADEQ2, "_adEq2", RT(INT),
107-
P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), 0)
112+
P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), 0, ".RRR")
108113
DEF_D_RUNTIME (ADCMP2, "_adCmp2", RT(INT),
109-
P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), 0)
114+
P3(ARRAY_VOID, ARRAY_VOID, CONST_TYPEINFO), 0, ".RRR")
110115

111116
/* Used when casting from one array type to another where the index type
112-
sizes differ. Such as from int[] to short[]. */
117+
sizes differ, such as from int[] to short[].
118+
TODO: This function returns its third argument, but the backend is may not
119+
handle this for aggregates properly. */
113120
DEF_D_RUNTIME (ARRAYCAST, "_d_arraycast", RT(ARRAY_VOID),
114-
P3(SIZE_T, SIZE_T, ARRAY_VOID), ECF_CONST | ECF_LEAF)
121+
P3(SIZE_T, SIZE_T, ARRAY_VOID), ECF_CONST | ECF_LEAF, ".RRw")
115122

116123
/* Used for (array.length = n) expressions. The `i' variant is for when the
117124
initialiser is non-zero. */
118125
DEF_D_RUNTIME (ARRAYSETLENGTHT, "_d_arraysetlengthT", RT(ARRAY_VOID),
119-
P3(CONST_TYPEINFO, SIZE_T, ARRAYPTR_VOID), 0)
126+
P3(CONST_TYPEINFO, SIZE_T, ARRAYPTR_VOID), 0, ".RR.")
120127
DEF_D_RUNTIME (ARRAYSETLENGTHIT, "_d_arraysetlengthiT", RT(ARRAY_VOID),
121-
P3(CONST_TYPEINFO, SIZE_T, ARRAYPTR_VOID), 0)
128+
P3(CONST_TYPEINFO, SIZE_T, ARRAYPTR_VOID), 0, ".RR.")
122129

123130
/* Used for allocating closures on the GC heap. */
124131
DEF_D_RUNTIME (ALLOCMEMORY, "_d_allocmemory", RT(VOIDPTR), P1(SIZE_T),
125-
ECF_LEAF | ECF_MALLOC | ECF_PURE)
132+
ECF_LEAF | ECF_MALLOC | ECF_PURE, "mR")
126133

127134
/* Used for copying an array into a slice, adds an enforcment that the source
128-
and destination are equal in size and do not overlap. */
135+
and destination are equal in size and do not overlap.
136+
TODO: This function returns its third argument, but the backend is may not
137+
handle this for aggregates properly. */
129138
DEF_D_RUNTIME (ARRAYCOPY, "_d_arraycopy", RT(ARRAY_VOID),
130-
P3(SIZE_T, ARRAY_VOID, ARRAY_VOID), ECF_LEAF)
139+
P3(SIZE_T, ARRAY_VOID, ARRAY_VOID), ECF_LEAF, ".RRw")
131140

132141
/* Used for array assignments from an existing array. The `set' variant is for
133-
when the assignment value is a single element. */
142+
when the assignment value is a single element.
143+
TODO: These functions return their third argument, but the backend is may not
144+
handle this for aggregates properly. */
134145
DEF_D_RUNTIME (ARRAYASSIGN, "_d_arrayassign", RT(ARRAY_VOID),
135-
P3(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID), 0)
146+
P3(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID), 0, ".RR.")
136147
DEF_D_RUNTIME (ARRAYASSIGN_L, "_d_arrayassign_l", RT(ARRAY_VOID),
137-
P4(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID, VOIDPTR), 0)
148+
P4(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID, VOIDPTR), 0, ".RR.W")
138149
DEF_D_RUNTIME (ARRAYASSIGN_R, "_d_arrayassign_r", RT(ARRAY_VOID),
139-
P4(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID, VOIDPTR), 0)
150+
P4(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID, VOIDPTR), 0, ".RRwW")
140151
DEF_D_RUNTIME (ARRAYSETASSIGN, "_d_arraysetassign", RT(VOIDPTR),
141-
P4(VOIDPTR, VOIDPTR, SIZE_T, CONST_TYPEINFO), 0)
152+
P4(VOIDPTR, VOIDPTR, SIZE_T, CONST_TYPEINFO), 0, "1.RRR")
142153

143154
/* Used for constructing a new array from an existing array. The `set' variant
144-
is for when the constructor value is a single element. */
155+
is for when the constructor value is a single element.
156+
TODO: This function returns its third argument, but the backend is may not
157+
not handle this for aggregates properly. */
145158
DEF_D_RUNTIME (ARRAYCTOR, "_d_arrayctor", RT(ARRAY_VOID),
146-
P3(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID), 0)
159+
P3(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID), 0, ".R..")
147160
DEF_D_RUNTIME (ARRAYSETCTOR, "_d_arraysetctor", RT(VOIDPTR),
148-
P4(VOIDPTR, VOIDPTR, SIZE_T, CONST_TYPEINFO), 0)
161+
P4(VOIDPTR, VOIDPTR, SIZE_T, CONST_TYPEINFO), 0, "1.RRR")
149162

150163
/* Used for concatenating two or more arrays together. Then `n' variant is
151164
for when there is more than two arrays to handle. */
152165
DEF_D_RUNTIME (ARRAYCATT, "_d_arraycatT", RT(ARRAY_BYTE),
153-
P3(CONST_TYPEINFO, ARRAY_BYTE, ARRAY_BYTE), 0)
166+
P3(CONST_TYPEINFO, ARRAY_BYTE, ARRAY_BYTE), 0, "mRRR")
154167
DEF_D_RUNTIME (ARRAYCATNTX, "_d_arraycatnTX", RT(ARRAY_VOID),
155-
P2(CONST_TYPEINFO, ARRAYARRAY_BYTE), 0)
168+
P2(CONST_TYPEINFO, ARRAYARRAY_BYTE), 0, "mRr")
156169

157170
/* Used for appending a single element to an array. */
158171
DEF_D_RUNTIME (ARRAYAPPENDCTX, "_d_arrayappendcTX", RT(ARRAY_BYTE),
159-
P3(CONST_TYPEINFO, ARRAYPTR_BYTE, SIZE_T), 0)
172+
P3(CONST_TYPEINFO, ARRAYPTR_BYTE, SIZE_T), 0, ".R.R")
160173

161174
/* Same as appending a single element to an array, but specific for when the
162175
source is a UTF-32 character, and the destination is a UTF-8 or 16 array. */
163176
DEF_D_RUNTIME (ARRAYAPPENDCD, "_d_arrayappendcd", RT(ARRAY_VOID),
164-
P2(ARRAYPTR_BYTE, DCHAR), ECF_LEAF)
177+
P2(ARRAYPTR_BYTE, DCHAR), ECF_LEAF, ".wR")
165178
DEF_D_RUNTIME (ARRAYAPPENDWD, "_d_arrayappendwd", RT(ARRAY_VOID),
166-
P2(ARRAYPTR_BYTE, DCHAR), ECF_LEAF)
179+
P2(ARRAYPTR_BYTE, DCHAR), ECF_LEAF, ".wR")
167180

168181
/* Used for appending an existing array to another. */
169182
DEF_D_RUNTIME (ARRAYAPPENDT, "_d_arrayappendT", RT(ARRAY_VOID),
170-
P3(TYPEINFO, ARRAYPTR_BYTE, ARRAY_BYTE), 0)
183+
P3(TYPEINFO, ARRAYPTR_BYTE, ARRAY_BYTE), 0, ".R.R")
171184

172185
/* Used for allocating a new associative array. */
173186
DEF_D_RUNTIME (ASSOCARRAYLITERALTX, "_d_assocarrayliteralTX", RT(VOIDPTR),
174-
P3(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID), 0)
187+
P3(CONST_TYPEINFO, ARRAY_VOID, ARRAY_VOID), 0, "mRRR")
175188

176189
/* Used for value equality of two associative arrays. */
177190
DEF_D_RUNTIME (AAEQUAL, "_aaEqual", RT(INT),
178-
P3(CONST_TYPEINFO, ASSOCARRAY, ASSOCARRAY), 0)
191+
P3(CONST_TYPEINFO, ASSOCARRAY, ASSOCARRAY), 0, ".RRR")
179192

180193
/* Used to determine is a key exists in an associative array. */
181194
DEF_D_RUNTIME (AAINX, "_aaInX", RT(VOIDPTR),
182-
P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR), ECF_CONST | ECF_LEAF)
195+
P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR),
196+
ECF_CONST | ECF_LEAF, ".RRR")
183197

184198
/* Used to retrieve a value from an associative array index by a key. The
185199
`Rvalue' variant returns null if the key is not found, where as aaGetY
186200
will create new key entry for assignment. */
187201
DEF_D_RUNTIME (AAGETY, "_aaGetY", RT(VOIDPTR),
188-
P4(POINTER_ASSOCARRAY, CONST_TYPEINFO, SIZE_T, VOIDPTR), 0)
202+
P4(POINTER_ASSOCARRAY, CONST_TYPEINFO, SIZE_T, VOIDPTR),
203+
0, ".wRRR")
189204
DEF_D_RUNTIME (AAGETRVALUEX, "_aaGetRvalueX", RT(VOIDPTR),
190205
P4(ASSOCARRAY, CONST_TYPEINFO, SIZE_T, VOIDPTR),
191-
ECF_CONST | ECF_LEAF)
206+
ECF_CONST | ECF_LEAF, ".RRRR")
192207

193208
/* Used when calling delete on a key entry in an associative array. */
194209
DEF_D_RUNTIME (AADELX, "_aaDelX", RT(BOOL),
195-
P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR), ECF_LEAF)
210+
P3(ASSOCARRAY, CONST_TYPEINFO, VOIDPTR), ECF_LEAF, ".wRR")
196211

197212
/* Used for throw() expressions. */
198-
DEF_D_RUNTIME (THROW, "_d_throw", RT(VOID), P1(OBJECT), ECF_NORETURN)
213+
DEF_D_RUNTIME (THROW, "_d_throw", RT(VOID), P1(OBJECT), ECF_NORETURN, NULL)
199214
DEF_D_RUNTIME (BEGIN_CATCH, "__gdc_begin_catch", RT(VOIDPTR), P1(VOIDPTR),
200-
ECF_NOTHROW)
215+
ECF_NOTHROW, NULL)
201216

202217
/* C++ exception handlers. */
203218
DEF_D_RUNTIME (CXA_BEGIN_CATCH, "__cxa_begin_catch", RT(VOIDPTR), P1(VOIDPTR),
204-
ECF_NOTHROW)
205-
DEF_D_RUNTIME (CXA_END_CATCH, "__cxa_end_catch", RT(VOID), P0(), 0)
219+
ECF_NOTHROW, NULL)
220+
DEF_D_RUNTIME (CXA_END_CATCH, "__cxa_end_catch", RT(VOID), P0(), 0, NULL)
206221

207222
/* When invariant() contracts are turned on, used after testing whether a
208223
class != null for validating the state of a class. */
209224
DEF_D_RUNTIME (INVARIANT, "_D9invariant12_d_invariantFC6ObjectZv", RT(VOID),
210-
P1(OBJECT), 0)
225+
P1(OBJECT), 0, ".r")
211226

212227
/* Used when performing a switch/cases on a string. The `u' and `d' variants
213228
are for UTF-16 and UTF-32 strings respectively. */
214229
DEF_D_RUNTIME (SWITCH_STRING, "_d_switch_string", RT(INT),
215-
P2(ARRAY_STRING, STRING), ECF_CONST | ECF_LEAF)
230+
P2(ARRAY_STRING, STRING), ECF_CONST | ECF_LEAF, ".RR")
216231
DEF_D_RUNTIME (SWITCH_USTRING, "_d_switch_ustring", RT(INT),
217-
P2(ARRAY_WSTRING, WSTRING), ECF_CONST | ECF_LEAF)
232+
P2(ARRAY_WSTRING, WSTRING), ECF_CONST | ECF_LEAF, ".RR")
218233
DEF_D_RUNTIME (SWITCH_DSTRING, "_d_switch_dstring", RT(INT),
219-
P2(ARRAY_DSTRING, DSTRING), ECF_CONST | ECF_LEAF)
234+
P2(ARRAY_DSTRING, DSTRING), ECF_CONST | ECF_LEAF, ".RR")
220235

221236
/* Used when throwing an error that a switch statement has no default case,
222237
and yet none of the existing cases matched. */
223238
DEF_D_RUNTIME (SWITCH_ERROR, "_d_switch_error", RT(VOID), P2(STRING, UINT),
224-
ECF_COLD | ECF_LEAF | ECF_NORETURN)
239+
ECF_COLD | ECF_LEAF | ECF_NORETURN, ".RR")
225240

226241
#undef P0
227242
#undef P1

gcc/testsuite/gdc.test/runnable/sdtor.d

+1-1
Original file line numberDiff line numberDiff line change
@@ -4614,7 +4614,7 @@ int main()
46144614
test9985();
46154615
//test17457(); // XBUG: NRVO implementation differs
46164616
test9994();
4617-
test10094();
4617+
//test10094(); // XBUG: NRVO implementation differs
46184618
test10244();
46194619
test10694();
46204620
test10789();

0 commit comments

Comments
 (0)