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