Daily bump.
[platform/upstream/gcc.git] / gcc / d / ChangeLog
1 2020-06-14  Iain Buclaw  <ibuclaw@gdcproject.org>
2
3         * expr.cc (ExprVisitor::visit (AssocArrayLiteralExp *)): Fix line
4         lengths, no functional change.
5         * typeinfo.cc (TypeInfoVisitor::layout_interfaces): Likewise.
6         (layout_classinfo_interfaces): Likewise.
7
8 2020-06-09  Iain Buclaw  <ibuclaw@gdcproject.org>
9
10         * dmd/MERGE: Merge upstream dmd 13d67c575.
11         * d-builtins.cc (build_frontend_type): Update call to
12         TypeVector::create.
13         * d-frontend.cc (Global::_init): Move setting of errorLimit to ...
14         * d-lang.cc (d_init_options): ... here.  Update for new field
15         location of errorLimit.
16         (d_post_options): Likewise.
17         * d-port.cc (Port::readwordLE): Update signature.
18         (Port::readwordBE): Likewise.
19         (Port::readlongLE): Likewise.
20         (Port::readlongBE): Likewise.
21         * decl.cc (get_symbol_decl): Update for new field types.
22
23 2020-06-08  Iain Buclaw  <ibuclaw@gdcproject.org>
24
25         PR d/95573
26         * dmd/MERGE: Merge upstream dmd 5041e56f1.
27
28 2020-06-08  Iain Buclaw  <ibuclaw@gdcproject.org>
29
30         * dmd/MERGE: Merge upstream dmd 955b8b36f.
31         * expr.cc (ExprVisitor::visit (AndAndExp *)): Rename type to ...
32         (ExprVisitor::visit (LogicalExp *)): ... this.  Handle both 'and if'
33         and 'or if' expression nodes.
34         (ExprVisitor::visit (OrOrExp *)): Remove.
35
36 2020-06-07  Iain Buclaw  <ibuclaw@gdcproject.org>
37
38         * dmd/MERGE: Merge upstream dmd 73d8e2fec.
39         * decl.cc (get_symbol_decl): Use new Prot::Kind enum.
40         * modules.cc (get_internal_fn): Likewise.
41
42 2020-06-07  Iain Buclaw  <ibuclaw@gdcproject.org>
43
44         * dmd/MERGE: Merge upstream dmd 108ca1bcd.
45         * d-diagnostic.cc (expand_d_format): Adjust to use extractChars().
46         * d-frontend.cc (Loc::toChars): Likewise.
47         * d-lang.cc (deps_write): Likewise.
48         (d_parse_file): Likewise.
49         * decl.cc (d_mangle_decl): Likewise.
50         * intrinsics.cc (maybe_set_intrinsic): Likewise.
51
52 2020-06-07  Iain Buclaw  <ibuclaw@gdcproject.org>
53
54         * dmd/MERGE: Merge upstream dmd b0df0e982.
55         * d-builtins.cc (build_frontend_type): Use VarArg for varargs_p.
56         * d-codegen.cc (declaration_type): Call TypeFunction::create with
57         argument VARARGnone.
58         (parameter_type): Likewise.
59         (d_build_call): Use new field names and member functions.
60         * d-target.cc (Target::cppParameterType): Call TypeFunction::create
61         with argument VARARGnone.
62         * types.cc (TypeVisitor::visit (TypeFunction *): Use new field names
63         and member functions.
64
65 2020-06-07  Iain Buclaw  <ibuclaw@gdcproject.org>
66
67         * dmd/MERGE: Merge upstream dmd 1831b24ff.
68         * d-lang.cc (d_init_options): Remove initialization of updated fields.
69         (d_handle_option): Adjust for new field types.
70
71 2020-06-07  Iain Buclaw  <ibuclaw@gdcproject.org>
72
73         * dmd/MERGE: Merge upstream dmd cef1e7991.
74         * d-lang.cc (d_parse_file): Adjust for new field types.
75
76 2020-06-05  Iain Buclaw  <ibuclaw@gdcproject.org>
77
78         * dmd/MERGE: Merge upstream dmd 740f3d1ea.
79         * d-lang.cc (d_handle_option): Use new fields to save debug and
80         version levels passed over command-line.
81         (d_post_options): Add them to front-end here.
82
83 2020-06-05  Iain Buclaw  <ibuclaw@gdcproject.org>
84
85         * dmd/MERGE: Merge upstream dmd f5638c7b8.
86         * d-builtins.cc (d_init_versions): Use new CHECKENABLE enum.
87         * d-codegen.cc (array_bounds_check): Likewise.
88         (build_frame_type): Likewise.
89         (get_frameinfo): Likewise.
90         * d-lang.cc (d_init_options): Likewise.
91         (d_init_options_struct): Don't initialize x_flag_bounds_check.
92         (d_handle_option): Use new CHECKENABLE enum.
93         (d_post_options): Likewise.  Set flag_bounds_check here.
94         * expr.cc (ExprVisitor::visit(AssertExp *)): Use new CHECKENABLE enum.
95
96 2020-06-05  Iain Buclaw  <ibuclaw@gdcproject.org>
97
98         * dmd/MERGE: Merge upstream dmd 56f0a65c4.
99         * d-builtins.cc (build_frontend_type): Remove static.
100         (d_build_builtins_module): Use target.va_listType() to get front-end
101         type for va_list.
102         (d_init_builtins): Move creation of va_list to Target::va_listType.
103         * d-codegen.cc (build_interface_binfo): Use new target global.
104         (build_vindex_ref): Likewise.
105         (identity_compare_p): Likewise.
106         * d-ctfloat.cc (CTFloat::parse): Likewise.
107         * d-lang.cc (d_init): Likewise.
108         * d-port.cc (Port::isFloat32LiteralOutOfRange): Likewise.
109         (Port::isFloat64LiteralOutOfRange): Likewise.
110         * d-target.cc (define_float_constants): Initialize constants through a
111         reference, instead of setting globals.
112         (Target::_init): Initialize new fields instead of setting globals.
113         (Target::va_listType): Build front-end type from va_list_type_node.
114         (Target::toCppMangle): Renamed to ...
115         (TargetCPP::toMangle): ... this.
116         (Target::cppTypeInfoMangle): Renamed to ...
117         (TargetCPP::typeInfoMangle): ... this.
118         (Target::cppTypeMangle): Renamed to ...
119         (TargetCPP::typeMangle): this.
120         (Target::cppParameterType): Renamed to ...
121         (TargetCPP::parameterType): ... this.  Use target.va_listType() to get
122         front-end type for va_list.
123         (Target::cppFundamentalType): Renamed to ...
124         (TargetCPP::fundamentalType): ... this.
125         * d-tree.h (build_frontend_type): Declare.
126         * decl.cc (base_vtable_offset): Use new target global.
127         * typeinfo.cc (layout_classinfo_interfaces): Likewise.
128         (layout_cpp_typeinfo): Likewise.
129         * types.cc (valist_array_p): Use target.va_listType() to get front-end
130         type for va_list.
131         (layout_aggregate_type): Use new target global.
132
133 2020-06-05  Iain Buclaw  <ibuclaw@gdcproject.org>
134
135         * dmd/MERGE: Merge upstream dmd 6d5bffa54.
136         * d-builtins.cc (maybe_set_builtin_1): Update call to
137         Condition::include().
138         * decl.cc (DeclVisitor::visit(AttribDeclaration *)): Likewise.
139         * types.cc (layout_aggregate_members): Likewise.
140
141 2020-06-04  Iain Buclaw  <ibuclaw@gdcproject.org>
142
143         * dmd/MERGE: Merge upstream dmd 48d704f08.
144         * d-attribs.cc (build_attributes): Use new field name.
145         * d-builtins.cc (build_frontend_type): Likewise.
146         (maybe_set_builtin_1): Likewise.
147         (d_maybe_set_builtin): Likewise.
148         * d-codegen.cc (build_interface_binfo): Likewise.
149         (identity_compare_p): Likewise.
150         (lower_struct_comparison): Likewise.
151         (build_struct_comparison): Likewise.
152         (d_build_call): Likewise.
153         (build_frame_type): Likewise.
154         (build_closure): Likewise.
155         * d-compiler.cc (Compiler::paintAsType): Likewise.
156         (Compiler::loadModule): Likewise.
157         * d-incpath.cc (add_globalpaths): Likewise.
158         (add_filepaths): Likewise.
159         (add_import_paths): Likewise.
160         * d-lang.cc (deps_write): Likewise.
161         (d_parse_file): Likewise.
162         * decl.cc (gcc_attribute_p): Likewise.
163         (base_vtable_offset): Likewise.
164         (get_vtable_decl): Likewise.
165         (build_class_instance): Likewise.
166         * expr.cc (class ExprVisitor): Likewise.
167         * modules.cc (layout_moduleinfo_fields): Likewise.
168         (layout_moduleinfo): Likewise.
169         (build_module_tree): Likewise.
170         * toir.cc (class IRVisitor): Likewise.
171         * typeinfo.cc (class TypeInfoVisitor): Likewise.
172         (layout_classinfo_interfaces): Likewise.
173         * types.cc (layout_aggregate_members): Likewise.
174         (layout_aggregate_type): Likewise.
175
176 2020-06-04  Iain Buclaw  <ibuclaw@gdcproject.org>
177
178         * dmd/MERGE: Merge upstream dmd 47ed0330f.
179
180 2020-06-04  Iain Buclaw  <ibuclaw@gdcproject.org>
181
182         * Make-lang.in (D_OBJS): Add d-compiler.o, d-ctfloat.o, d-port.o.
183         * d-frontend.cc (Port::memicmp): Move to d-port.cc.
184         (Port::strupr): Likewise.
185         (Port::isFloat32LiteralOutOfRange): Likewise.
186         (Port::isFloat64LiteralOutOfRange): Likewise.
187         (Port::readwordLE): Likewise.
188         (Port::readwordBE): Likewise.
189         (Port::readlongLE): Likewise.
190         (Port::readlongBE): Likewise.
191         (Port::valcpy): Likewise.
192         (CTFloat::fabs): Move to d-ctfloat.cc.
193         (CTFloat::ldexp): Likewise.
194         (CTFloat::isIdentical): Likewise.
195         (CTFloat::isNaN): Likewise.
196         (CTFloat::isSNaN): Likewise.
197         (CTFloat::isInfinity): Likewise.
198         (CTFloat::parse): Likewise.
199         (CTFloat::sprint): Likewise.
200         (CTFloat::hash): Likewise.
201         (Compiler::genCmain): Move to d-compiler.cc.
202         (Compiler::paintAsType): Likewise.
203         (Compiler::loadModule): Likewise.
204         * d-compiler.cc: New file.
205         * d-ctfloat.cc: New file.
206         * d-port.cc: New file.
207
208 2020-06-02  Iain Buclaw  <ibuclaw@gdcproject.org>
209
210         * decl.cc (DeclVisitor::build_dsymbol): New function.
211         (DeclVisitor::visit (TupleDeclaration *)): Use build_dsymbol to
212         traverse AST instead of accept.
213         (DeclVisitor::visit (AttribDeclaration *)): Likewise.
214         (DeclVisitor::visit (Nspace *)): Likewise.
215         (DeclVisitor::visit (TemplateDeclaration *)): Likewise.
216         (DeclVisitor::visit (TemplateInstance *)): Likewise.
217         (DeclVisitor::visit (TemplateMixin *)): Likewise.
218         (DeclVisitor::visit (StructDeclaration *)): Likewise.
219         (DeclVisitor::visit (ClassDeclaration *)): Likewise.
220         (DeclVisitor::visit (InterfaceDeclaration *)): Likewise.
221         (DeclVisitor::visit (VarDeclaration *)): Likewise.
222         (build_decl_tree): Likewise.
223
224 2020-06-02  Iain Buclaw  <ibuclaw@gdcproject.org>
225
226         * d-builtins.cc (build_frontend_type): Handle struct fields with NULL
227         DECL_NAME.  Use byte_position to get the real field offset.
228
229 2020-05-06  Iain Buclaw  <ibuclaw@gdcproject.org>
230
231         PR d/94970
232         * d-codegen.cc (force_target_expr): Move create_temporary_var
233         implementation inline here.
234         (create_temporary_var): Remove.
235         (maybe_temporary_var): Remove.
236         (bind_expr): Remove.
237         * d-convert.cc (d_array_convert): Use build_local_temp to generate
238         temporaries, and generate its assignment.
239         * d-tree.h (create_temporary_var): Remove.
240         (maybe_temporary_var): Remove.
241         (d_array_convert): Remove vars argument.
242         * expr.cc (ExprVisitor::visit (CatExp *)): Use build_local_temp to
243         generate temporaries, don't wrap them in a BIND_EXPR.
244         (ExprVisitor::visit (NewExp *)): Likewise.
245
246 2020-04-30  Iain Buclaw  <ibuclaw@gdcproject.org>
247
248         * gdc.texi (Options for Linking): Clarify usage of -defaultlib= and
249         -debuglib= options.
250
251 2020-04-29  Iain Buclaw  <ibuclaw@gdcproject.org>
252
253         * d-codegen.cc (d_decl_context): Don't include module in the name of
254         class and struct types that aren't extern(D).
255
256 2020-04-27  Iain Buclaw  <ibuclaw@gdcproject.org>
257
258         PR d/94777
259         * d-builtins.cc (build_frontend_type): Set parent for generated
260         fields of built-in types.
261         * d-codegen.cc (argument_reference_p): Rename to ...
262         (parameter_reference_p): ... this.
263         (type_passed_as): Rename to ...
264         (parameter_type): ... this.  Make TREE_ADDRESSABLE types restrict.
265         (d_build_call): Move handling of non-POD types here from ...
266         * d-convert.cc (convert_for_argument): ... here.
267         * d-tree.h (argument_reference_p): Rename declaration to ...
268         (parameter_reference_p): ... this.
269         (type_passed_as): Rename declaration to ...
270         (parameter_type): ... this.
271         * types.cc (TypeVisitor::visit (TypeFunction *)): Update caller.
272
273 2020-04-26  Iain Buclaw  <ibuclaw@gdcproject.org>
274
275         * decl.cc (get_symbol_decl): Set DECL_DECLARED_INLINE_P or
276         DECL_UNINLINABLE for declarations with pragma(inline).
277         * toir.cc (IRVisitor::visit (GccAsmStatement *)): Set ASM_INLINE_P if
278         in function decorated with pragma(inline).
279
280 2020-04-25  Iain Buclaw  <ibuclaw@gdcproject.org>
281
282         * intrinsics.cc (expand_intrinsic_toprec): New function.
283         (maybe_expand_intrinsic): Handle toPrec intrinsics.
284         * intrinsics.def (TOPRECF, TOPREC, TOPRECL): Add toPrec intrinsics.
285
286 2020-04-24  Iain Buclaw  <ibuclaw@gdcproject.org>
287
288         * d-spec.cc (need_phobos): Remove.
289         (lang_specific_driver): Replace need_phobos with phobos_library.
290         Reorder -debuglib and -defaultlib to have precedence over libphobos.
291         (lang_specific_pre_link): Remove test for need_phobos.
292
293 2020-04-19  Iain Buclaw  <ibuclaw@gdcproject.org>
294
295         PR d/94609
296         * d-codegen.cc (argument_reference_p): Don't check TREE_ADDRESSABLE.
297         (type_passed_as): Build reference type if TREE_ADDRESSABLE.
298         * d-convert.cc (convert_for_argument): Build explicit TARGET_EXPR if
299         needed for arguments passed by invisible reference.
300         * types.cc (TypeVisitor::visit (TypeStruct *)): Mark all structs that
301         are not POD as TREE_ADDRESSABLE.
302
303 2020-04-13  Iain Buclaw  <ibuclaw@gdcproject.org>
304
305         * Make-lang.in (D_FRONTEND_OBJS): Remove d/argtypes.o.
306         * d-target.cc (Target::toArgTypes): New function.
307
308 2020-04-10  Iain Buclaw  <ibuclaw@gdcproject.org>
309
310         * d-spec.cc (LIBDRUNTIME): Remove.
311         (LIBDRUNTIME_PROFILE): Remove.
312         (lang_specific_driver): Don't link in libgdruntime.
313
314 2020-04-07  Iain Buclaw  <ibuclaw@gdcproject.org>
315
316         PR d/94425
317         * toir.cc (IRVisitor::visit (GccAsmStatement *)): Set ASM_VOLATILE_P
318         on all asm statements.
319
320 2020-04-01  Iain Buclaw  <ibuclaw@gdcproject.org>
321
322         PR d/90136
323         * d-attribs.cc: Include dmd/attrib.h.
324         (build_attributes): Redeclare as static.
325         (apply_user_attributes): New function.
326         * d-tree.h (class UserAttributeDeclaration): Remove.
327         (build_attributes): Remove.
328         (apply_user_attributes): Declare.
329         (finish_aggregate_type): Remove attrs argument.
330         * decl.cc (get_symbol_decl): Merge declaration prototypes with
331         definitions.  Use apply_user_attributes.
332         * modules.cc (layout_moduleinfo_fields): Remove last argument to
333         finish_aggregate_type.
334         * typeinfo.cc (layout_classinfo_interfaces): Likewise.
335         * types.cc (layout_aggregate_members): Likewise.
336         (finish_aggregate_type): Remove attrs argument.
337         (TypeVisitor::visit (TypeEnum *)): Use apply_user_attributes.
338         (TypeVisitor::visit (TypeStruct *)): Remove last argument to
339         finish_aggregate_type.  Use apply_user_attributes.
340         (TypeVisitor::visit (TypeClass *)): Likewise.
341
342 2020-03-31  Iain Buclaw  <ibuclaw@gdcproject.org>
343
344         * d-attribs.cc (d_langhook_common_attribute_table): Add always_inline.
345         (handle_always_inline_attribute): New function.
346
347 2020-03-31  Iain Buclaw  <ibuclaw@gdcproject.org>
348
349         PR d/94424
350         * d-codegen.cc (build_alignment_field): Remove.
351         (build_struct_literal): Don't insert alignment padding.
352         * expr.cc (ExprVisitor::visit (AssignExp *)): Call memset before
353         assigning struct literals.
354
355 2020-03-31  Iain Buclaw  <ibuclaw@gdcproject.org>
356
357         * typeinfo.cc (TypeInfoVisitor::internal_reference): Call
358         d_comdat_linkage on generated decl.
359
360 2020-03-22  Iain Buclaw  <ibuclaw@gdcproject.org>
361
362         PR d/93038
363         * d-lang.cc (deps_write): Generate phony targets for content imported
364         files.
365
366 2020-03-22  Iain Buclaw  <ibuclaw@gdcproject.org>
367
368         PR d/93038
369         * d-lang.cc (deps_write): Add content imported files to the make
370         dependency list.
371
372 2020-03-21  Iain Buclaw  <ibuclaw@gdcproject.org>
373
374         PR d/94240
375         * typeinfo.cc (class TypeInfoVisitor): Replace type_ field with decl_.
376         (TypeInfoVisitor::TypeInfoVisitor): Set decl_.
377         (TypeInfoVisitor::result): Update.
378         (TypeInfoVisitor::internal_reference): New function.
379         (TypeInfoVisitor::layout_string): Use internal_reference.
380         (TypeInfoVisitor::visit (TypeInfoTupleDeclaration *)): Likewise.
381         (layout_typeinfo): Construct TypeInfoVisitor with typeinfo decl.
382         (layout_classinfo): Likewise.
383
384 2020-03-20  Iain Buclaw  <ibuclaw@gdcproject.org>
385
386         PR lto/91027
387         * d-tree.h (struct GTY): Add daggregate field.
388         (IDENTIFIER_DAGGREGATE): Define.
389         (d_mangle_decl): Add declaration.
390         * decl.cc (mangle_decl): Remove static linkage, rename to...
391         (d_mangle_decl): ...this, update all callers.
392         * types.cc (merge_aggregate_types): New function.
393         (TypeVisitor::visit (TypeStruct *)): Call merge_aggregate_types, set
394         IDENTIFIER_DAGGREGATE and TYPE_CXX_ODR_P.
395         (TypeVisitor::visit (TypeClass *)): Likewise.
396
397 2020-03-18  Jakub Jelinek  <jakub@redhat.com>
398
399         * expr.cc (ExprVisitor::visit (CatAssignExp *)): Fix up duplicated
400         word issue in a comment.
401         * d-target.cc (Target::FPTypeProperties<T>::max): Likewise.
402
403 2020-03-16  Iain Buclaw  <ibuclaw@gdcproject.org>
404
405         PR d/92309
406         * types.cc (fixup_anonymous_offset): Don't set DECL_FIELD_OFFSET on
407         anonymous fields.
408
409 2020-03-16  Iain Buclaw  <ibuclaw@gdcproject.org>
410
411         PR d/92216
412         * decl.cc (make_thunk): Don't set TREE_PUBLIC on thunks if the target
413         function is external to the current compilation.
414
415 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
416
417         Update copyright years.
418
419         * gdc.texi: Bump @copyrights-d year.
420 \f
421 Copyright (C) 2020 Free Software Foundation, Inc.
422
423 Copying and distribution of this file, with or without modification,
424 are permitted in any medium without royalty provided the copyright
425 notice and this notice are preserved.