Daily bump.
[platform/upstream/gcc.git] / gcc / d / ChangeLog
1 2021-06-09  Iain Buclaw  <ibuclaw@gdcproject.org>
2
3         PR d/100964
4         * dmd/MERGE: Merge upstream dmd 4a4e46a6f.
5
6 2021-06-09  Iain Buclaw  <ibuclaw@gdcproject.org>
7
8         PR d/100935
9         * dmd/MERGE: Merge upstream dmd f3fdeb578.
10
11 2021-06-04  Iain Buclaw  <ibuclaw@gdcproject.org>
12
13         PR d/100882
14         * d-codegen.cc (build_assign): Construct initializations inside
15         TARGET_EXPR_INITIAL.
16         (compound_expr): Remove intermediate expressions that have no
17         side-effects.
18         (return_expr): Construct returns inside TARGET_EXPR_INITIAL.
19         * expr.cc (ExprVisitor::visit (CallExp *)): Remove useless assignment
20         to TARGET_EXPR_SLOT.
21
22 2021-05-18  Iain Buclaw  <ibuclaw@gdcproject.org>
23
24         * d-incpath.cc (prefixed_path): Use filename_ncmp instead of strncmp.
25
26 2021-05-18  Iain Buclaw  <ibuclaw@gdcproject.org>
27
28         * types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function
29         instead of strncmp.
30
31 2021-05-18  Iain Buclaw  <ibuclaw@gdcproject.org>
32
33         * dmd/dinterpret.c (evaluateIfBuiltin): Revert last change.
34         * dmd/dmangle.c: Likewise.
35         * dmd/hdrgen.c: Likewise.
36         * dmd/identifier.c (Identifier::toHChars2): Likewise.
37
38 2021-05-10  Iain Buclaw  <ibuclaw@gdcproject.org>
39
40         * dmd/MERGE: Merge upstream dmd b7d146c4c.
41
42 2021-05-10  Martin Liska  <mliska@suse.cz>
43
44         * d-builtins.cc (do_build_builtin_fn): Use startswith
45         function instead of strncmp.
46         * dmd/dinterpret.c (evaluateIfBuiltin): Likewise.
47         * dmd/dmangle.c: Likewise.
48         * dmd/hdrgen.c: Likewise.
49         * dmd/identifier.c (Identifier::toHChars2): Likewise.
50
51 2021-04-19  Iain Buclaw  <ibuclaw@gdcproject.org>
52
53         PR d/98457
54         * d-diagnostic.cc (expand_d_format): Handle escaped backticks.
55         (escape_d_format): New funtion.
56         (verror): Call escape_d_format on prefixing strings.
57         (vdeprecation): Likewise.
58
59 2021-04-17  Iain Buclaw  <ibuclaw@gdcproject.org>
60
61         PR d/99914
62         * d-target.def (d_templates_always_comdat): New hook.
63         * d-tree.h (mark_needed): Remove prototype.
64         * decl.cc: Include d-target.h.
65         (mark_needed): Rename to...
66         (d_mark_needed): ...this.  Make static.
67         (set_linkage_for_decl): Put variables in comdat if
68         d_templates_always_comdat.
69
70 2021-04-17  Iain Buclaw  <ibuclaw@gdcproject.org>
71
72         * d-target.cc (d_handle_target_object_format): New function.
73         (d_language_target_info): Add d_handle_target_object_format as handler
74         for objectFormat key.
75         (Target::getTargetInfo): Continue if handler returned NULL_TREE.
76
77 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
78
79         * d-target.cc (Target::_init): Call new targetdm hook to register OS
80         specific target info keys.
81         * d-target.def (d_register_os_target_info): New hook.
82
83 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
84
85         * d-builtins.cc (d_add_builtin_version): Remove all setting of
86         target-specific global.params.
87         * typeinfo.cc (create_typeinfo): Don't add argType fields to
88         TypeInfo_Struct.
89
90 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
91
92         PR d/99914
93         * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't set
94         DECL_INSTANTIATED on static initializer declarations.
95         (DeclVisitor::visit (ClassDeclaration *)): Likewise.
96         (DeclVisitor::visit (EnumDeclaration *)): Likewise.
97         (d_finish_decl): Move call to set_linkage_for_decl to...
98         (declare_extern_var): ...here.
99
100 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
101
102         * d-target.cc (Target::_init): Call new targetdm hook to register CPU
103         specific target info keys.
104         * d-target.def (d_register_cpu_target_info): New hook.
105
106 2021-04-14  Iain Buclaw  <ibuclaw@gdcproject.org>
107
108         * d-target.cc (Target::systemLinkage): Return LINKwindows if
109         d_has_stdcall_convention applies to LINKsystem.
110         * d-target.def (d_has_stdcall_convention): New hook.
111         * types.cc (TypeVisitor::visit (TypeFunction *)): Insert "stdcall"
112         function attribute if d_has_stdcall_convention applies to LINKwindows.
113
114 2021-04-10  Iain Buclaw  <ibuclaw@gdcproject.org>
115
116         * dmd/MERGE: Merge upstream dmd 0450061c8.
117
118 2021-04-08  Iain Buclaw  <ibuclaw@gdcproject.org>
119
120         * d-attribs.cc: Include fold-const.h and opts.h.
121         (attr_noreturn_exclusions): Add alloc_size.
122         (attr_const_pure_exclusions): Likewise.
123         (attr_inline_exclusions): Add target_clones.
124         (attr_noinline_exclusions): Rename forceinline to always_inline.
125         (attr_target_exclusions): New array.
126         (attr_target_clones_exclusions): New array.
127         (attr_alloc_exclusions): New array.
128         (attr_cold_hot_exclusions): New array.
129         (d_langhook_common_attribute_table): Add new D attribute handlers.
130         (build_attributes): Update to look for gcc.attributes.  Issue warning
131         if not given a struct literal.  Handle void initialized arguments.
132         (handle_always_inline_attribute): Remove function.
133         (d_handle_noinline_attribute): Don't extract TYPE_LANG_FRONTEND.
134         (d_handle_forceinline_attribute): Rename to...
135         (d_handle_always_inline_attribute): ...this.  Remove special handling.
136         (d_handle_flatten_attribute): Don't extract TYPE_LANG_FRONTEND.
137         (d_handle_target_attribute): Likewise.  Warn about empty arguments.
138         (d_handle_target_clones_attribute): New function.
139         (optimize_args): New static variable.
140         (parse_optimize_options): New function.
141         (d_handle_optimize_attribute): New function.
142         (d_handle_noclone_attribute): Don't extract TYPE_LANG_FRONTEND.
143         (d_handle_alias_attribute): Remove function.
144         (d_handle_noicf_attribute): New function.
145         (d_handle_noipa_attribute): New function.
146         (d_handle_section_attribute): Call the handle_generic_attribute target
147         hook after performing target independent processing.
148         (d_handle_symver_attribute): New function.
149         (d_handle_noplt_attribute): New function.
150         (positional_argument): New function.
151         (d_handle_alloc_size_attribute): New function.
152         (d_handle_cold_attribute): New function.
153         (d_handle_restrict_attribute): New function.
154         (d_handle_used_attribute): New function.
155         * decl.cc (gcc_attribute_p): Update to look for gcc.attributes.
156         (get_symbol_decl): Update decl source location of old prototypes to
157         the new declaration being merged.
158         * types.cc (layout_aggregate_members): Apply user defined attributes
159         on fields.
160
161 2021-04-06  Iain Buclaw  <ibuclaw@gdcproject.org>
162
163         PR d/99917
164         * dmd/MERGE: Merge upstream dmd d16195406.
165
166 2021-04-06  Iain Buclaw  <ibuclaw@gdcproject.org>
167
168         * d-codegen.cc (build_frame_type): Use Array::find to get index of
169         element.
170
171 2021-04-06  Iain Buclaw  <ibuclaw@gdcproject.org>
172
173         * d-diagnostic.cc (vwarning): Increment gaggedWarnings if warning
174         message was suppressed.
175         (vdeprecation): Likewise for deprecation messages.
176
177 2021-04-06  Iain Buclaw  <ibuclaw@gdcproject.org>
178
179         * dmd/MERGE: Merge upstream dmd 5cc71ff83.
180
181 2021-04-05  Iain Buclaw  <ibuclaw@gdcproject.org>
182
183         PR d/99914
184         * d-lang.cc (d_init): Disable flag_weak_templates if no support for
185         weak or one-only symbols.
186         * d-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
187         (DECL_INSTANTIATED): New macro.
188         (d_comdat_linkage): Remove declaration.
189         (d_linkonce_linkage): Remove declaration.
190         (set_linkage_for_decl): New declaration.
191         * decl.cc (DeclVisitor::visit (StructDeclaration *)): Replace call to
192         d_linkonce_linkage with setting DECL_INSTANTIATED.
193         (DeclVisitor::visit (ClassDeclaration *)): Likewise.
194         (DeclVisitor::visit (EnumDeclaration *)): Likewise.
195         (DeclVisitor::visit (InterfaceDeclaration *)): Remove call to
196         d_linkonce_linkage.
197         (get_symbol_decl): Call set_linkage_for_decl instead of
198         d_linkonce_linkage.
199         (d_finish_decl): Call set_linkage_for_decl.
200         (d_comdat_linkage): Made function static.  Only set DECL_COMDAT for
201         DECL_INSTANTIATED decls.
202         (d_linkonce_linkage): Remove function.
203         (d_weak_linkage): New function.
204         (set_linkage_for_decl): New function.
205         * gdc.texi (Runtime Options): Rename -fno-weak to -fno-weak-templates,
206         update documentation of option.
207         * lang.opt (fweak): Rename option to ...
208         (fweak-templates): ... this.  Update help string.
209         * modules.cc (get_internal_fn): Add Prot parameter.  Set generated
210         function flag.
211         (build_internal_fn): Update call to get_internal_fn.
212         (build_dso_cdtor_fn): Likewise.
213         (register_moduleinfo): Call d_finish_decl on dso_slot_node and
214         dso_initialized_node.
215         * typeinfo.cc (TypeInfoVisitor::internal_reference): Call
216         set_linkage_for_decl instead of d_comdat_linkage.
217         (TypeInfoDeclVisitor::visit (TypeInfoDeclaration *)): Remove calls to
218         d_linkonce_linkage and d_comdat_linkage.
219         (get_cpp_typeinfo_decl): Likewise.
220
221 2021-04-03  Iain Buclaw  <ibuclaw@gdcproject.org>
222
223         * dmd/MERGE: Merge upstream dmd 3b808e838.
224         * Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
225         * d-codegen.cc (build_struct_literal): Handle special enums.
226         * d-convert.cc (convert_expr): Handle noreturn type.
227         (convert_for_condition): Likewise.
228         * d-target.cc (Target::_init): Set type for wchar_t.
229         (TargetCPP::derivedClassOffset): New method.
230         (Target::libraryObjectMonitors): New method.
231         * decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
232         type noreturn.
233         * toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
234         noreturn types.
235         * types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
236         (TypeVisitor::visit (TypeEnum *)): Handle special enums.
237
238 2021-03-28  Iain Buclaw  <ibuclaw@gdcproject.org>
239
240         * d-builtins.cc (d_init_versions): Predefine D_PIE if flag_pie is set.
241
242 2021-03-28  Iain Buclaw  <ibuclaw@gdcproject.org>
243
244         * d-lang.cc (d_enum_underlying_base_type): New function.
245         (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Set as
246         d_enum_underlying_base_type.
247
248 2021-03-28  Iain Buclaw  <ibuclaw@gdcproject.org>
249
250         * Make-lang.in (DMDGEN_COMPILE): Remove.
251         (d/%.dmdgen.o): Use COMPILER_FOR_BUILD and BUILD_COMPILERFLAGS to
252         build all D generator programs.
253         (D_SYSTEM_H): New macro.
254         (d/idgen.dmdgen.o): Add dependencies to build.
255         (d/impcnvgen.dmdgen.o): Likewise.
256         * d-system.h: Include bconfig.h if GENERATOR_FILE is defined.
257
258 2021-03-28  Iain Buclaw  <ibuclaw@gdcproject.org>
259
260         * config-lang.in (gtfiles): Remove modules.cc.
261         * modules.cc (struct module_info): Remove GTY marker.
262         (static_ctor_list): Remove variable.
263         (static_dtor_list): Remove variable.
264         (register_moduleinfo): Directly set DECL_STATIC_CONSTRUCTOR on
265         dso_ctor, and DECL_STATIC_DESTRUCTOR on dso_dtor.
266         (d_finish_compilation): Remove static ctor/dtor handling.
267
268 2021-03-06  Iain Buclaw  <ibuclaw@gdcproject.org>
269
270         * d-lang.cc (d_init_options_struct): Don't set default
271         flag_complex_method.
272
273 2021-03-03  Iain Buclaw  <ibuclaw@gdcproject.org>
274
275         PR d/99337
276         * dmd/MERGE: Merge upstream dmd a3c9bf422.
277
278 2021-02-13  Iain Buclaw  <ibuclaw@gdcproject.org>
279
280         * dmd/MERGE: Merge upstream dmd 7132b3537.
281         * Make-lang.in (D_FRONTEND_OBJS): Add d/dsymbolsem.o, d/semantic2.o,
282         d/semantic3.o, and d/templateparamsem.o.
283         * d-compiler.cc (Compiler::genCmain): Update calls to semantic
284         entrypoint functions.
285         * d-lang.cc (d_parse_file): Likewise.
286         * typeinfo.cc (make_frontend_typeinfo): Likewise.
287
288 2021-02-05  Iain Buclaw  <ibuclaw@gdcproject.org>
289
290         * d-tree.h (DEF_D_INTRINSIC): Don't insert INTRINSIC_ into the
291         intrinsic code name.
292         * intrinsics.cc (DEF_D_INTRINSIC): Don't insert INTRISIC_ and
293         BUILT_IN_ into the intrinsic and built-in code names.
294         * intrinsics.def:  Explicitly use full intrinsic and built-in
295         codes in all definitions.
296
297 2021-02-04  Iain Buclaw  <ibuclaw@gdcproject.org>
298
299         * dmd/MERGE: Merge upstream dmd 46133f761.
300         * d-builtins.cc (d_build_builtins_module): Set builtins as BUILTINgcc.
301         (maybe_set_builtin_1): Likewise.
302         * d-frontend.cc (eval_builtin): Adjust condition for early return.
303         * intrinsics.cc (maybe_set_intrinsic): Set intrinsics as BUILTINgcc.
304         (maybe_expand_intrinsic): Add case for INTRINSIC_BSWAP16.
305         * intrinsics.def (INTRINSIC_BT): Update signature.
306         (INTRINSIC_BT64): Likewise.
307         (INTRINSIC_BSWAP16): New intrinsic.
308         (INTRINSIC_VLOAD8): Update module.
309         (INTRINSIC_VLOAD16): Likewise.
310         (INTRINSIC_VLOAD32): Likewise.
311         (INTRINSIC_VLOAD64): Likewise.
312         (INTRINSIC_VSTORE8): Likewise.
313         (INTRINSIC_VSTORE16): Likewise.
314         (INTRINSIC_VSTORE32): Likewise.
315         (INTRINSIC_VSTORE64): Likewise.
316         (INTRINSIC_ADDS): Update signature.
317         (INTRINSIC_ADDSL): Likewise.
318         (INTRINSIC_ADDU): Likewise.
319         (INTRINSIC_ADDUL): Likewise.
320         (INTRINSIC_SUBS): Likewise.
321         (INTRINSIC_SUBSL): Likewise.
322         (INTRINSIC_SUBU): Likewise.
323         (INTRINSIC_SUBUL): Likewise.
324         (INTRINSIC_MULS): Likewise.
325         (INTRINSIC_MULSL): Likewise.
326         (INTRINSIC_MULU): Likewise.
327         (INTRINSIC_MULUI): Likewise.
328         (INTRINSIC_MULUL): Likewise.
329         (INTRINSIC_NEGS): Likewise.
330         (INTRINSIC_NEGSL): Likewise.
331
332 2021-02-02  Iain Buclaw  <ibuclaw@gdcproject.org>
333
334         PR d/98921
335         * dmd/MERGE: Merge upstream dmd 5e2a81d9c.
336
337 2021-01-30  Iain Buclaw  <ibuclaw@gdcproject.org>
338
339         * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoDeclaration *)): Don't
340         layout m_arg1 and m_arg2 fields.
341
342 2021-01-26  Iain Buclaw  <ibuclaw@gdcproject.org>
343
344         * dmd/MERGE: Merge upstream dmd 609c3ce2d.
345         * d-compiler.cc (Compiler::loadModule): Rename to ...
346         (Compiler::onParseModule): ... this.
347         (Compiler::onImport): New function.
348         * d-lang.cc (d_parse_file): Remove call to Compiler::loadModule.
349
350 2021-01-21  Iain Buclaw  <ibuclaw@gdcproject.org>
351
352         * dmd/MERGE: Merge upstream dmd 3a7ebef73.
353
354 2021-01-11  Iain Buclaw  <ibuclaw@gdcproject.org>
355
356         * dmd/MERGE: Merge upstream dmd 2d3d13748.
357         * d-lang.cc (d_handle_option): Remove OPT_ftransition_checkimports and
358         OPT_ftransition_import.
359         * gdc.texi (Warnings): Remove documentation for -ftransition=import
360         and -ftransition=checkimports.
361         * lang.opt (ftransition=checkimports): Remove.
362         (ftransition=import): Remove.
363
364 2021-01-09  Iain Buclaw  <ibuclaw@gdcproject.org>
365
366         * dmd/MERGE: Merge upstream dmd cb1106ad5.
367
368 2021-01-09  Iain Buclaw  <ibuclaw@gdcproject.org>
369
370         * dmd/MERGE: Merge upstream dmd 9bba772fa.
371
372 2021-01-09  Iain Buclaw  <ibuclaw@gdcproject.org>
373
374         * dmd/MERGE: Merge upstream dmd e598f69c0.
375
376 2021-01-07  Iain Buclaw  <ibuclaw@gdcproject.org>
377
378         * dmd/MERGE: Merge upstream dmd 9038e64c5.
379         * d-builtins.cc (build_frontend_type): Update call to
380         Parameter::create.
381
382 2021-01-05  Iain Buclaw  <ibuclaw@gdcproject.org>
383
384         * dmd/MERGE: Merge upstream dmd a5c86f5b9.
385         * d-builtins.cc (d_eval_constant_expression): Handle ADDR_EXPR trees
386         created by build_string_literal.
387         * d-frontend.cc (retStyle): Remove function.
388         * d-target.cc (d_language_target_info): New variable.
389         (d_target_info_table): Likewise.
390         (Target::_init): Initialize d_target_info_table.
391         (Target::isReturnOnStack): New function.
392         (d_add_target_info_handlers): Likewise.
393         (d_handle_target_cpp_std): Likewise.
394         (d_handle_target_cpp_runtime_library): Likewise.
395         (Target::getTargetInfo): Likewise.
396         * d-target.h (struct d_target_info_spec): New type.
397         (d_add_target_info_handlers): Declare.
398
399 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
400
401         * gdc.texi: Bump @copyrights-d year.
402
403 2021-01-01  Jakub Jelinek  <jakub@redhat.com>
404
405         * ChangeLog-2020: Rotate ChangeLog.  New file.
406
407 \f
408 Copyright (C) 2021 Free Software Foundation, Inc.
409
410 Copying and distribution of this file, with or without modification,
411 are permitted in any medium without royalty provided the copyright
412 notice and this notice are preserved.