1 2021-12-28 Martin Liska <mliska@suse.cz>
3 * gdc.texi: Use one more https.
5 2021-12-28 Martin Liska <mliska@suse.cz>
7 * gdc.texi: Replace http:// with https.
9 2021-12-20 Iain Buclaw <ibuclaw@gdcproject.org>
11 * dmd/MERGE: Merge upstream dmd ad8412530.
12 * expr.cc (ExprVisitor::visit (DeleteExp *)): Remove code generation
14 * runtime.def (DELSTRUCT): Remove.
16 2021-12-15 Iain Buclaw <ibuclaw@gdcproject.org>
18 * d-lang.cc (d_init_options): Set default -fextern-std= to C++17.
19 * dmd/MERGE: Merge upstream dmd 93108bb9e.
20 * gdc.texi (Runtime Options): Document the default for -fextern-std=.
22 2021-12-10 Iain Buclaw <ibuclaw@gdcproject.org>
25 * dmd/MERGE: Merge upstream dmd 3982604c5.
26 * Make-lang.in (D_FRONTEND_OBJS): Add d/root-optional.o.
27 * d-attribs.cc (build_attributes): Update for new front-end interface.
28 * d-codegen.cc (d_build_call): Likewise.
29 * d-compiler.cc (Compiler::paintAsType): Likewise.
30 * d-lang.cc (d_handle_option): Remove OPT_fpreview_intpromote, add
31 handling of OPT_frevert_intpromote.
32 * d-port.cc (Port::valcpy): Assert buffer is aligned.
33 * d-target.cc (Target::isVectorOpSupported): Update for new front-end
35 * decl.cc (layout_class_initializer): Likewise.
36 * expr.cc (lvalue_p): Likewise.
37 (binop_assignment): Likewise.
38 (ExprVisitor::visit): Likewise.
39 (ExprVisitor::visit (AssignExp *)): Remove generation of _d_arrayctor
40 and _d_arraysetctor library helpers.
41 (ExprVisitor::visit (VarExp *)): Support __traits(initSymbol).
42 * intrinsics.cc (expand_intrinsic_rotate): Update for new front-end
44 * lang.opt (fpreview=intpromote): Remove.
45 (frevert=intpromote): New.
46 * runtime.def (ARRAYCTOR): Remove.
47 (ARRAYSETCTOR): Remove.
48 * toir.cc (IRVisitor::visit): Update for new front-end interface.
49 * types.cc (layout_aggregate_members): Likewise.
50 * dmd/root/optional.d: New file.
51 * dmd/root/optional.h: New file.
53 2021-12-10 Iain Buclaw <ibuclaw@gdcproject.org>
55 * decl.cc (get_symbol_decl): Align methods to MINIMUM_METHOD_BOUNDARY.
57 2021-12-09 Martin Liska <mliska@suse.cz>
59 * expr.cc: Call memcpy only when length != 0.
61 2021-12-08 Iain Buclaw <ibuclaw@gdcproject.org>
63 * dmd/MERGE: Merge upstream dmd 568496d5b.
64 * Make-lang.in (D_FRONTEND_OBJS): Add d/common-file.o,
65 d/common-outbuffer.o, d/common-string.o, d/file_manager.o,
66 d/importc.o. Remove d/root-outbuffer.o.
67 (d/common-%.o): New recipe.
68 * d-builtins.cc (build_frontend_type): Update for new front-end
70 (d_build_d_type_nodes): Set noreturn_type_node.
71 * d-codegen.cc (d_build_call): Don't call function if one of the
72 arguments is type 'noreturn'.
73 (build_vthis_function): Propagate TYPE_QUAL_VOLATILE from original
75 * d-frontend.cc (eval_builtin): Update signature.
76 (getTypeInfoType): Likewise.
77 (toObjFile): New function.
78 * d-gimplify.cc (d_gimplify_call_expr): Always evaluate arguments from
80 * d-lang.cc (d_handle_option): Handle OPT_ftransition_in.
81 (d_parse_file): Don't generate D main if it is declared in user code.
82 * d-tree.h (CALL_EXPR_ARGS_ORDERED): Remove.
83 (enum d_tree_index): Add DTI_BOTTOM_TYPE.
84 (noreturn_type_node): New.
85 * decl.cc (apply_pragma_crt): Remove.
86 (DeclVisitor::visit): Update for new front-end interface.
87 (DeclVisitor::visit (PragmaDeclaration *)): Don't handle
88 crt_constructor and crt_destructor pragmas.
89 (DeclVisitor::visit (VarDeclaration *)): Don't generate declarations
91 (DeclVisitor::visit (FuncDeclaration *)): Stop adding parameters when
92 'noreturn' type has been encountered.
93 (get_symbol_decl): Set DECL_STATIC_CONSTRUCTOR and
94 DECL_STATIC_DESTRUCTOR on decl node if requested.
95 (aggregate_initializer_decl): Update for new front-end interface.
96 * expr.cc (ExprVisitor::visit (CallExp *)): Always use the 'this'
97 object as the result of calling any constructor function.
98 (ExprVisitor::visit): Update for new front-end interface.
99 * gdc.texi (Runtime Options): Document -fmain and -ftransition=in.
100 * lang.opt (ftransition=in): New option.
101 * modules.cc (get_internal_fn): Update for new front-end interface.
102 * types.cc (TypeVisitor::visit): Likewise.
103 (TypeVisitor::visit (TypeNoreturn *)): Return noreturn_type_node.
104 (TypeVisitor::visit (TypeFunction *)): Stop adding parameters when
105 'notreturn' type has been encountered. Qualify function types that
106 return 'noreturn' as TYPE_QUAL_VOLATILE.
108 2021-12-02 Iain Buclaw <ibuclaw@gdcproject.org>
111 * d-frontend.h (gc_disable): Declare.
112 * d-lang.cc (d_init_options): Disable the D runtime garbage collector
115 2021-12-02 Iain Buclaw <ibuclaw@gdcproject.org>
117 * Make-lang.in (D_FRONTEND_OBJS): Prefix object files from the root
119 (d/root-%.o): New recipe.
121 2021-12-01 Iain Buclaw <ibuclaw@gdcproject.org>
123 * d-spec.cc (lang_specific_driver): Set SKIPOPT on -static-libstdc++
124 and -static-libphobos only when target supports LD_STATIC_DYNAMIC.
125 Remove generate_option to re-add -static-libstdc++.
127 2021-12-01 Iain Buclaw <ibuclaw@gdcproject.org>
129 * gdc.texi (Runtime Options): Document -fcheckaction=, -fextern-std=,
130 -fpreview=, -frevert=.
131 (Code Generation): Document -fdump-c++-spec=, -fdump-c++-spec-verbose,
133 (Warnings): Update list of supported -ftransitions=.
135 2021-11-30 Iain Buclaw <ibuclaw@gdcproject.org>
137 * dmd/MERGE: Merge upstream dmd b8384668f.
138 * Make-lang.in (d-warn): Use strict warnings.
139 (DMD_WARN_CXXFLAGS): Remove.
140 (DMD_COMPILE): Remove.
141 (CHECKING_DFLAGS): Define.
142 (WARN_DFLAGS): Define.
143 (ALL_DFLAGS): Define.
144 (DCOMPILE.base): Define.
146 (DPOSTCOMPILE): Define.
149 (D_FRONTEND_OBJS): Add new dmd front-end objects.
150 (D_GENERATED_SRCS): Remove.
151 (D_GENERATED_OBJS): Remove.
152 (D_ALL_OBJS): Remove D_GENERATED_OBJS.
153 (d21$(exeext)): Build using DLLINKER and -static-libphobos.
154 (d.tags): Remove dmd/*.c and dmd/root/*.c.
155 (d.mostlyclean): Remove D_GENERATED_SRCS, d/idgen$(build_exeext),
156 d/impcnvgen$(build_exeext).
157 (D_INCLUDES): Include $(srcdir)/d/dmd/res.
158 (CFLAGS-d/id.o): Remove.
159 (CFLAGS-d/impcnvtab.o): Remove.
160 (d/%.o): Build using DCOMPILE and DPOSTCOMPILE. Update dependencies
161 from d/dmd/%.c to d/dmd/%.d.
162 (d/idgen$(build_exeext)): Remove.
163 (d/impcnvgen$(build_exeext)): Remove.
166 (d/impcnvtab.c): Remove.
167 (d/%.dmdgen.o): Remove.
168 (D_SYSTEM_H): Remove.
169 (d/idgen.dmdgen.o): Remove.
170 (d/impcnvgen.dmdgen.o): Remove.
171 * config-lang.in (boot_language): New variable.
172 * d-attribs.cc: Include dmd/expression.h.
173 * d-builtins.cc: Include d-frontend.h.
174 (build_frontend_type): Update for new front-end interface.
175 (d_eval_constant_expression): Likewise.
176 (d_build_builtins_module): Likewise.
177 (maybe_set_builtin_1): Likewise.
178 (d_build_d_type_nodes): Likewise.
179 * d-codegen.cc (d_decl_context): Likewise.
180 (declaration_reference_p): Likewise.
181 (declaration_type): Likewise.
182 (parameter_reference_p): Likewise.
183 (parameter_type): Likewise.
184 (get_array_length): Likewise.
185 (build_delegate_cst): Likewise.
186 (build_typeof_null_value): Likewise.
187 (identity_compare_p): Likewise.
188 (lower_struct_comparison): Likewise.
189 (build_filename_from_loc): Likewise.
190 (build_assert_call): Remove LIBCALL_SWITCH_ERROR.
191 (build_bounds_index_condition): Call LIBCALL_ARRAYBOUNDS_INDEXP on
193 (build_bounds_slice_condition): Call LIBCALL_ARRAYBOUNDS_SLICEP on
195 (array_bounds_check): Update for new front-end interface.
196 (checkaction_trap_p): Handle CHECKACTION_context.
197 (get_function_type): Update for new front-end interface.
198 (d_build_call): Likewise.
199 * d-compiler.cc: Remove include of dmd/scope.h.
200 (Compiler::genCmain): Remove.
201 (Compiler::paintAsType): Update for new front-end interface.
202 (Compiler::onParseModule): Likewise.
203 * d-convert.cc (convert_expr): Remove call to LIBCALL_ARRAYCAST.
204 (convert_for_rvalue): Update for new front-end interface.
205 (convert_for_assignment): Likewise.
206 (convert_for_condition): Likewise.
207 (d_array_convert): Likewise.
208 * d-diagnostic.cc (error): Remove.
209 (errorSupplemental): Remove.
211 (warningSupplemental): Remove.
212 (deprecation): Remove.
213 (deprecationSupplemental): Remove.
216 * d-frontend.cc (global): Remove.
217 (Global::_init): Remove.
218 (Global::startGagging): Remove.
219 (Global::endGagging): Remove.
220 (Global::increaseErrorCount): Remove.
222 (Loc::toChars): Remove.
223 (Loc::equals): Remove.
224 (isBuiltin): Update for new front-end interface.
225 (eval_builtin): Likewise.
226 (getTypeInfoType): Likewise.
227 (inlineCopy): Remove.
228 * d-incpath.cc: Include d-frontend.h.
229 (add_globalpaths): Call d_gc_malloc to allocate Strings.
230 (add_filepaths): Likewise.
231 * d-lang.cc: Include dmd/id.h, dmd/root/file.h, d-frontend.h. Remove
232 include of dmd/mars.h, id.h.
233 (entrypoint_module): Remove.
234 (entrypoint_root_module): Remove.
235 (deps_write_string): Update for new front-end interface.
236 (deps_write): Likewise.
237 (d_init_options): Call rt_init. Remove setting global params that are
238 default initialized by the front-end.
239 (d_handle_option): Handle OPT_fcheckaction_, OPT_fdump_c___spec_,
240 OPT_fdump_c___spec_verbose, OPT_fextern_std_, OPT_fpreview,
241 OPT_revert, OPT_fsave_mixins_, and OPT_ftransition.
242 (d_post_options): Propagate dip1021 and dip1000 preview flags to
243 dip25, and flag_diagnostics_show_caret to printErrorContext.
244 (d_add_entrypoint_module): Remove.
245 (d_parse_file): Update for new front-end interface.
246 (d_type_promotes_to): Likewise.
247 (d_types_compatible_p): Likewise.
248 * d-longdouble.cc (CTFloat::zero): Remove.
249 (CTFloat::one): Remove.
250 (CTFloat::minusone): Remove.
251 (CTFloat::half): Remove.
252 * d-system.h (POSIX): Remove.
267 (UINT32_MAX): Remove.
268 (UINT64_MAX): Remove.
269 * d-target.cc: Include calls.h.
271 (define_float_constants): Remove initialization of snan.
272 (Target::_init): Update for new front-end interface.
273 (Target::isVectorTypeSupported): Likewise.
274 (Target::isVectorOpSupported): Remove cases for unordered operators.
275 (TargetCPP::typeMangle): Update for new front-end interface.
276 (TargetCPP::parameterType): Likewise.
277 (Target::systemLinkage): Likewise.
278 (Target::isReturnOnStack): Likewise.
279 (Target::isCalleeDestroyingArgs): Define.
280 (Target::preferPassByRef): Define.
281 * d-tree.h (d_add_entrypoint_module): Remove.
282 * decl.cc (gcc_attribute_p): Update for new front-end interface.
283 (apply_pragma_crt): Define.
284 (DeclVisitor::visit(PragmaDeclaration *)): Handle pragmas
285 crt_constructor and crt_destructor.
286 (DeclVisitor::visit(TemplateDeclaration *)): Update for new front-end
288 (DeclVisitor::visit): Likewise.
289 (DeclVisitor::finish_vtable): Likewise.
290 (get_symbol_decl): Error if template has more than one nesting
291 context. Update for new front-end interface.
292 (make_thunk): Update for new front-end interface.
293 (get_vtable_decl): Likewise.
294 * expr.cc (ExprVisitor::visit): Likewise.
295 (build_return_dtor): Likewise.
296 * imports.cc (ImportVisitor::visit): Likewise.
297 * intrinsics.cc: Include dmd/expression.h. Remove include of
299 (maybe_set_intrinsic): Update for new front-end interface.
300 * intrinsics.def (INTRINSIC_ROL): Update intrinsic signature.
301 (INTRINSIC_ROR): Likewise.
302 (INTRINSIC_ROR_TIARG): Likewise.
303 (INTRINSIC_TOPREC): Likewise.
304 (INTRINSIC_TOPRECL): Likewise.
305 (INTRINSIC_TAN): Update intrinsic module and signature.
306 (INTRINSIC_ISNAN): Likewise.
307 (INTRINSIC_ISFINITE): Likewise.
308 (INTRINSIC_COPYSIGN): Define intrinsic.
309 (INTRINSIC_COPYSIGNI): Define intrinsic.
310 (INTRINSIC_EXP): Update intrinsic module.
311 (INTRINSIC_EXPM1): Likewise.
312 (INTRINSIC_EXP2): Likewise.
313 (INTRINSIC_LOG): Likewise.
314 (INTRINSIC_LOG2): Likewise.
315 (INTRINSIC_LOG10): Likewise.
316 (INTRINSIC_POW): Likewise.
317 (INTRINSIC_ROUND): Likewise.
318 (INTRINSIC_FLOORF): Likewise.
319 (INTRINSIC_FLOOR): Likewise.
320 (INTRINSIC_FLOORL): Likewise.
321 (INTRINSIC_CEILF): Likewise.
322 (INTRINSIC_CEIL): Likewise.
323 (INTRINSIC_CEILL): Likewise.
324 (INTRINSIC_TRUNC): Likewise.
325 (INTRINSIC_FMIN): Likewise.
326 (INTRINSIC_FMAX): Likewise.
327 (INTRINSIC_FMA): Likewise.
328 (INTRINSIC_VA_ARG): Update intrinsic signature.
329 (INTRINSIC_VASTART): Likewise.
330 * lang.opt (fcheck=): Add alternate aliases for contract switches.
331 (fcheckaction=): New option.
332 (check_action): New Enum and EnumValue entries.
333 (fdump-c++-spec-verbose): New option.
334 (fdump-c++-spec=): New option.
335 (fextern-std=): New option.
336 (extern_stdcpp): New Enum and EnumValue entries
337 (fpreview=): New options.
338 (frevert=): New options.
339 (fsave-mixins): New option.
340 (ftransition=): Update options.
341 * modules.cc (get_internal_fn): Replace Prot with Visibility.
342 (build_internal_fn): Likewise.
343 (build_dso_cdtor_fn): Likewise.
344 (build_module_tree): Remove check for __entrypoint module.
345 * runtime.def (P5): Define.
346 (ARRAYBOUNDS_SLICEP): Define.
347 (ARRAYBOUNDS_INDEXP): Define.
351 (SWITCH_STRING): Remove.
352 (SWITCH_USTRING): Remove.
353 (SWITCH_DSTRING): Remove.
354 (SWITCH_ERROR): Remove.
355 * toir.cc (IRVisitor::visit): Update for new front-end interface.
356 (IRVisitor::check_previous_goto): Remove checks for case and default
358 (IRVisitor::visit(SwitchStatement *)): Remove handling of string
360 * typeinfo.cc: Include d-frontend.h.
361 (get_typeinfo_kind): Update for new front-end interface.
362 (make_frontend_typeinfo): Likewise.
363 (TypeInfoVisitor::visit): Likewise.
364 (builtin_typeinfo_p): Likewise.
365 (get_typeinfo_decl): Likewise.
366 (build_typeinfo): Likewise.
367 * types.cc (valist_array_p): Likewise.
368 (make_array_type): Likewise.
369 (merge_aggregate_types): Likewise.
370 (TypeVisitor::visit(TypeBasic *)): Likewise.
371 (TypeVisitor::visit(TypeFunction *)): Likewise.
372 (TypeVisitor::visit(TypeStruct *)): Update comment.
374 * d-frontend.h: New file.
376 2021-11-29 Eric Gallager <egallager@gcc.gnu.org>
379 * Make-lang.in: Use ETAGS variable in TAGS target.
381 2021-11-28 Martin Liska <mliska@suse.cz>
383 * d-attribs.cc (parse_optimize_options): Fix thinko.
385 2021-11-26 Martin Liska <mliska@suse.cz>
387 * d-attribs.cc (parse_optimize_options): Check index before
388 accessing cl_options.
390 2021-11-18 Iain Buclaw <ibuclaw@gdcproject.org>
392 * decl.cc (d_finish_decl): Use HOST_WIDE_INT for type size
395 2021-10-22 Eric Gallager <egallager@gcc.gnu.org>
398 * Make-lang.in: Allow dvi-formatted documentation
401 2021-10-08 Martin Liska <mliska@suse.cz>
403 * d-lang.cc (d_post_options): Use new macro
406 2021-10-05 Iain Sandoe <iain@sandoe.co.uk>
408 * d-spec.cc (lang_specific_driver): Push the -static-libstdc++
409 option back onto the command line for targets without support
410 for -Bstatic/dynamic.
412 2021-10-04 Iain Buclaw <ibuclaw@gdcproject.org>
415 * d-spec.cc (lang_specific_driver): Link libstdc++ statically if
416 -static-libstdc++ was given on command-line.
418 2021-10-04 Iain Buclaw <ibuclaw@gdcproject.org>
420 * d-attribs.cc (d_handle_optimize_attribute): Save target node before
421 calling parse_optimize_options in case it changes.
423 2021-09-12 Iain Buclaw <ibuclaw@gdcproject.org>
426 * d-builtins.cc (d_eval_constant_expression): Don't include
427 terminating null pointer in string expression conversion.
429 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
431 * d-codegen.cc: Include dmd/module.h.
432 (build_filename_from_loc): New function.
433 (d_assert_call): Rename to...
434 (build_assert_call): ...this.
435 (build_array_bounds_call): Call arrayboundsp variant of the array
436 bounds failure callback.
437 (build_bounds_condition): Rename to...
438 (build_bounds_index_condition): ...this. Update signature.
439 (build_bounds_slice_condition): New function.
440 (checkaction_trap_p): New function.
441 (d_assert_call): Call assertp variant of assert failure callback.
442 * d-tree.h (class IndexExp): Declare.
443 (class SliceExp): Declare.
444 (build_bounds_condition): Remove.
445 (build_assert_call): Declare.
446 (build_bounds_index_condition): Declare.
447 (build_bounds_slice_condition): Declare.
448 (checkaction_trap_p): Declare.
449 (d_assert_call): Remove.
450 * expr.cc (ExprVisitor::visit(IndexExp *)): Call
451 build_bounds_index_condition.
452 (ExprVisitor::visit(SliceExp *)): Call build_bounds_slice_condition.
453 (ExprVisitor::visit(AssertExp *)): Update setting of libcall.
454 * runtime.cc (enum d_libcall_type): Add LCT_IMMUTABLE_CHARPTR.
455 (get_libcall_type): Handle LCT_IMMUTABLE_CHARPTR.
456 * runtime.def (ASSERT): Rename to...
457 (ASSERTP): ...this. Update signature.
458 (UNITTEST): Rename to...
459 (UNITTESTP): ...this. Update signature.
460 (ARRAY_BOUNDS): Rename to...
461 (ARRAYBOUNDSP): ...this. Updates signature.
462 * toir.cc (IRVisitor::visit(SwitchErrorStatement *)): Update call.
464 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
466 * typeinfo.cc (class TypeInfoVisitor::layout_base): Update comment.
468 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
470 * typeinfo.cc (TypeInfoVisitor::visit(TypeInfoClassDeclaration *)):
471 Use int to store type flags.
472 (TypeInfoVisitor::visit(TypeInfoStructDeclaration *)): Likewise.
474 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
476 * types.cc (TypeVisitor::visit(TypeEnum*)): Get wchar_t type from
479 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
481 * d-convert.cc (convert_for_rvalue): Convert switch statement into if
484 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
486 * d-builtins.cc (d_init_versions): Use POINTER_SIZE for testing
487 whether to predefine D_LP64.
489 2021-08-29 Iain Buclaw <ibuclaw@gdcproject.org>
492 * d-codegen.cc (build_frame_type): Set TYPE_CXX_ODR_P.
494 2021-08-25 Lewis Hyatt <lhyatt@gmail.com>
497 * d-lang.cc (d_input_charset_callback): New function.
498 (d_init): Call new function
499 diagnostic_initialize_input_context().
501 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
503 * expr.cc (binary_op): Remove dead code.
505 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
507 * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoClassDeclaration *)):
508 Always layout initializer for the m_RTInfo field.
510 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
512 * expr.cc (ExprVisitor::visit (AssertExp *)): Don't generate
515 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
517 * expr.cc (ExprVisitor::visit (AssignExp *)): Clarify comment
518 for generating static array assignment with literal.
520 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
522 * decl.cc (enum_initializer_decl): Only handle named enums.
524 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
526 * decl.cc (make_thunk): Set COMDAT and visibility of thunks only if
529 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
531 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't use sinit
532 for declaration directly.
533 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
534 (aggregate_initializer_decl): Likewise. Set sinit after creating.
536 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
538 * d-builtins.cc (build_frontend_type): Use Identifier::idPool to
539 generate anonymous field name.
541 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
543 * types.cc (layout_aggregate_type): Call hasMonitor.
544 * typeinfo.cc (TypeInfoVisitor::layout_base): Likewise.
545 (layout_cpp_typeinfo): Likewise. Don't emit vtable unless
548 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
550 * d-lang.cc (deps_add_target): Insert null terminator in buffer.
551 (deps_write): Likewise.
552 (d_parse_file): Likewise.
554 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
556 * d-builtins.cc (build_frontend_type): Restore builtin_converted_decls
557 length on conversion failure.
559 2021-07-30 Iain Buclaw <ibuclaw@gdcproject.org>
561 * d-codegen.cc (d_nested_class): Rename to ...
562 (get_outer_function): ... this. Handle all aggregate declarations.
563 (d_nested_struct): Remove.
564 (find_this_tree): Use get_outer_function.
565 (get_framedecl): Likewise.
567 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
570 * typeinfo.cc (make_frontend_typeinfo): Generate Object class if it
572 (check_typeinfo_type): Don't warn if there's no location.
574 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
577 * expr.cc (ExprVisitor::visit (CallExp *)): Use object expression as
578 result for C++ constructor calls.
580 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
583 * d-convert.cc (convert_for_rvalue): New function.
584 * d-tree.h (convert_for_rvalue): Declare.
585 * expr.cc (ExprVisitor::visit (CastExp *)): Use convert_for_rvalue.
586 (build_return_dtor): Likewise.
588 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
591 * d-lang.cc (d_parse_file): Remove generated D header files on error.
593 2021-07-29 Iain Buclaw <ibuclaw@gdcproject.org>
596 * d-diagnostic.cc (escape_d_format): Don't escape quoted format
599 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
602 * expr.cc (binary_op): Use build2 instead of fold_build2.
604 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
607 * dmd/MERGE: Merge upstream dmd 27e388b4c.
608 * d-codegen.cc (build_array_index): Handle void arrays same as byte.
609 * d-convert.cc (convert_expr): Handle converting to zero-sized arrays.
611 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
614 * dmd/MERGE: Merge upstream dmd f8c1ca928.
616 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
619 * d-builtins.cc (d_builtin_function_ext_scope): New function.
620 * d-lang.cc (LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE): Define.
621 * d-tree.h (d_builtin_function_ext_scope): Declare.
623 2021-07-28 Iain Buclaw <ibuclaw@gdcproject.org>
626 * dmd/MERGE: Merge upstream dmd 1d8386a63.
628 2021-07-03 Iain Buclaw <ibuclaw@gdcproject.org>
631 * toir.cc (IRVisitor::visit (ReturnStatement *)): Detect returns that
632 use a temporary, and replace with return value.
634 2021-07-02 Iain Buclaw <ibuclaw@gdcproject.org>
637 * d-codegen.cc (build_assign): Force target_expr on RHS for non-POD
638 assignment expressions.
640 2021-06-11 Iain Buclaw <ibuclaw@gdcproject.org>
643 * dmd/MERGE: Merge upstream dmd 7a3808254.
645 2021-06-10 Iain Buclaw <ibuclaw@gdcproject.org>
648 * d-frontend.cc (getTypeInfoType): Move TypeInfo checks to
649 check_typeinfo_type and call new function.
650 * d-tree.h (check_typeinfo_type): Declare.
651 * typeinfo.cc: Include dmd/scope.h.
652 (create_frontend_tinfo_types): Generate front-end types even if Object
654 (build_typeinfo): Move TypeInfo checks to check_typeinfo_type and call
656 (check_typeinfo_type): New function.
658 2021-06-09 Iain Buclaw <ibuclaw@gdcproject.org>
661 * dmd/MERGE: Merge upstream dmd 4a4e46a6f.
663 2021-06-09 Iain Buclaw <ibuclaw@gdcproject.org>
666 * dmd/MERGE: Merge upstream dmd f3fdeb578.
668 2021-06-04 Iain Buclaw <ibuclaw@gdcproject.org>
671 * d-codegen.cc (build_assign): Construct initializations inside
673 (compound_expr): Remove intermediate expressions that have no
675 (return_expr): Construct returns inside TARGET_EXPR_INITIAL.
676 * expr.cc (ExprVisitor::visit (CallExp *)): Remove useless assignment
679 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
681 * d-incpath.cc (prefixed_path): Use filename_ncmp instead of strncmp.
683 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
685 * types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function
688 2021-05-18 Iain Buclaw <ibuclaw@gdcproject.org>
690 * dmd/dinterpret.c (evaluateIfBuiltin): Revert last change.
691 * dmd/dmangle.c: Likewise.
692 * dmd/hdrgen.c: Likewise.
693 * dmd/identifier.c (Identifier::toHChars2): Likewise.
695 2021-05-10 Iain Buclaw <ibuclaw@gdcproject.org>
697 * dmd/MERGE: Merge upstream dmd b7d146c4c.
699 2021-05-10 Martin Liska <mliska@suse.cz>
701 * d-builtins.cc (do_build_builtin_fn): Use startswith
702 function instead of strncmp.
703 * dmd/dinterpret.c (evaluateIfBuiltin): Likewise.
704 * dmd/dmangle.c: Likewise.
705 * dmd/hdrgen.c: Likewise.
706 * dmd/identifier.c (Identifier::toHChars2): Likewise.
708 2021-04-19 Iain Buclaw <ibuclaw@gdcproject.org>
711 * d-diagnostic.cc (expand_d_format): Handle escaped backticks.
712 (escape_d_format): New funtion.
713 (verror): Call escape_d_format on prefixing strings.
714 (vdeprecation): Likewise.
716 2021-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
719 * d-target.def (d_templates_always_comdat): New hook.
720 * d-tree.h (mark_needed): Remove prototype.
721 * decl.cc: Include d-target.h.
722 (mark_needed): Rename to...
723 (d_mark_needed): ...this. Make static.
724 (set_linkage_for_decl): Put variables in comdat if
725 d_templates_always_comdat.
727 2021-04-17 Iain Buclaw <ibuclaw@gdcproject.org>
729 * d-target.cc (d_handle_target_object_format): New function.
730 (d_language_target_info): Add d_handle_target_object_format as handler
731 for objectFormat key.
732 (Target::getTargetInfo): Continue if handler returned NULL_TREE.
734 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
736 * d-target.cc (Target::_init): Call new targetdm hook to register OS
737 specific target info keys.
738 * d-target.def (d_register_os_target_info): New hook.
740 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
742 * d-builtins.cc (d_add_builtin_version): Remove all setting of
743 target-specific global.params.
744 * typeinfo.cc (create_typeinfo): Don't add argType fields to
747 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
750 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Don't set
751 DECL_INSTANTIATED on static initializer declarations.
752 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
753 (DeclVisitor::visit (EnumDeclaration *)): Likewise.
754 (d_finish_decl): Move call to set_linkage_for_decl to...
755 (declare_extern_var): ...here.
757 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
759 * d-target.cc (Target::_init): Call new targetdm hook to register CPU
760 specific target info keys.
761 * d-target.def (d_register_cpu_target_info): New hook.
763 2021-04-14 Iain Buclaw <ibuclaw@gdcproject.org>
765 * d-target.cc (Target::systemLinkage): Return LINKwindows if
766 d_has_stdcall_convention applies to LINKsystem.
767 * d-target.def (d_has_stdcall_convention): New hook.
768 * types.cc (TypeVisitor::visit (TypeFunction *)): Insert "stdcall"
769 function attribute if d_has_stdcall_convention applies to LINKwindows.
771 2021-04-10 Iain Buclaw <ibuclaw@gdcproject.org>
773 * dmd/MERGE: Merge upstream dmd 0450061c8.
775 2021-04-08 Iain Buclaw <ibuclaw@gdcproject.org>
777 * d-attribs.cc: Include fold-const.h and opts.h.
778 (attr_noreturn_exclusions): Add alloc_size.
779 (attr_const_pure_exclusions): Likewise.
780 (attr_inline_exclusions): Add target_clones.
781 (attr_noinline_exclusions): Rename forceinline to always_inline.
782 (attr_target_exclusions): New array.
783 (attr_target_clones_exclusions): New array.
784 (attr_alloc_exclusions): New array.
785 (attr_cold_hot_exclusions): New array.
786 (d_langhook_common_attribute_table): Add new D attribute handlers.
787 (build_attributes): Update to look for gcc.attributes. Issue warning
788 if not given a struct literal. Handle void initialized arguments.
789 (handle_always_inline_attribute): Remove function.
790 (d_handle_noinline_attribute): Don't extract TYPE_LANG_FRONTEND.
791 (d_handle_forceinline_attribute): Rename to...
792 (d_handle_always_inline_attribute): ...this. Remove special handling.
793 (d_handle_flatten_attribute): Don't extract TYPE_LANG_FRONTEND.
794 (d_handle_target_attribute): Likewise. Warn about empty arguments.
795 (d_handle_target_clones_attribute): New function.
796 (optimize_args): New static variable.
797 (parse_optimize_options): New function.
798 (d_handle_optimize_attribute): New function.
799 (d_handle_noclone_attribute): Don't extract TYPE_LANG_FRONTEND.
800 (d_handle_alias_attribute): Remove function.
801 (d_handle_noicf_attribute): New function.
802 (d_handle_noipa_attribute): New function.
803 (d_handle_section_attribute): Call the handle_generic_attribute target
804 hook after performing target independent processing.
805 (d_handle_symver_attribute): New function.
806 (d_handle_noplt_attribute): New function.
807 (positional_argument): New function.
808 (d_handle_alloc_size_attribute): New function.
809 (d_handle_cold_attribute): New function.
810 (d_handle_restrict_attribute): New function.
811 (d_handle_used_attribute): New function.
812 * decl.cc (gcc_attribute_p): Update to look for gcc.attributes.
813 (get_symbol_decl): Update decl source location of old prototypes to
814 the new declaration being merged.
815 * types.cc (layout_aggregate_members): Apply user defined attributes
818 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
821 * dmd/MERGE: Merge upstream dmd d16195406.
823 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
825 * d-codegen.cc (build_frame_type): Use Array::find to get index of
828 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
830 * d-diagnostic.cc (vwarning): Increment gaggedWarnings if warning
831 message was suppressed.
832 (vdeprecation): Likewise for deprecation messages.
834 2021-04-06 Iain Buclaw <ibuclaw@gdcproject.org>
836 * dmd/MERGE: Merge upstream dmd 5cc71ff83.
838 2021-04-05 Iain Buclaw <ibuclaw@gdcproject.org>
841 * d-lang.cc (d_init): Disable flag_weak_templates if no support for
842 weak or one-only symbols.
843 * d-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
844 (DECL_INSTANTIATED): New macro.
845 (d_comdat_linkage): Remove declaration.
846 (d_linkonce_linkage): Remove declaration.
847 (set_linkage_for_decl): New declaration.
848 * decl.cc (DeclVisitor::visit (StructDeclaration *)): Replace call to
849 d_linkonce_linkage with setting DECL_INSTANTIATED.
850 (DeclVisitor::visit (ClassDeclaration *)): Likewise.
851 (DeclVisitor::visit (EnumDeclaration *)): Likewise.
852 (DeclVisitor::visit (InterfaceDeclaration *)): Remove call to
854 (get_symbol_decl): Call set_linkage_for_decl instead of
856 (d_finish_decl): Call set_linkage_for_decl.
857 (d_comdat_linkage): Made function static. Only set DECL_COMDAT for
858 DECL_INSTANTIATED decls.
859 (d_linkonce_linkage): Remove function.
860 (d_weak_linkage): New function.
861 (set_linkage_for_decl): New function.
862 * gdc.texi (Runtime Options): Rename -fno-weak to -fno-weak-templates,
863 update documentation of option.
864 * lang.opt (fweak): Rename option to ...
865 (fweak-templates): ... this. Update help string.
866 * modules.cc (get_internal_fn): Add Prot parameter. Set generated
868 (build_internal_fn): Update call to get_internal_fn.
869 (build_dso_cdtor_fn): Likewise.
870 (register_moduleinfo): Call d_finish_decl on dso_slot_node and
871 dso_initialized_node.
872 * typeinfo.cc (TypeInfoVisitor::internal_reference): Call
873 set_linkage_for_decl instead of d_comdat_linkage.
874 (TypeInfoDeclVisitor::visit (TypeInfoDeclaration *)): Remove calls to
875 d_linkonce_linkage and d_comdat_linkage.
876 (get_cpp_typeinfo_decl): Likewise.
878 2021-04-03 Iain Buclaw <ibuclaw@gdcproject.org>
880 * dmd/MERGE: Merge upstream dmd 3b808e838.
881 * Make-lang.in (D_FRONTEND_OBJS): Add d/chkformat.o.
882 * d-codegen.cc (build_struct_literal): Handle special enums.
883 * d-convert.cc (convert_expr): Handle noreturn type.
884 (convert_for_condition): Likewise.
885 * d-target.cc (Target::_init): Set type for wchar_t.
886 (TargetCPP::derivedClassOffset): New method.
887 (Target::libraryObjectMonitors): New method.
888 * decl.cc (get_symbol_decl): Set TREE_THIS_VOLATILE for functions of
890 * toir.cc (IRVisitor::visit (ReturnStatement *)): Handle returning
892 * types.cc (TypeVisitor::visit (TypeNoreturn *)): New method.
893 (TypeVisitor::visit (TypeEnum *)): Handle special enums.
895 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
897 * d-builtins.cc (d_init_versions): Predefine D_PIE if flag_pie is set.
899 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
901 * d-lang.cc (d_enum_underlying_base_type): New function.
902 (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Set as
903 d_enum_underlying_base_type.
905 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
907 * Make-lang.in (DMDGEN_COMPILE): Remove.
908 (d/%.dmdgen.o): Use COMPILER_FOR_BUILD and BUILD_COMPILERFLAGS to
909 build all D generator programs.
910 (D_SYSTEM_H): New macro.
911 (d/idgen.dmdgen.o): Add dependencies to build.
912 (d/impcnvgen.dmdgen.o): Likewise.
913 * d-system.h: Include bconfig.h if GENERATOR_FILE is defined.
915 2021-03-28 Iain Buclaw <ibuclaw@gdcproject.org>
917 * config-lang.in (gtfiles): Remove modules.cc.
918 * modules.cc (struct module_info): Remove GTY marker.
919 (static_ctor_list): Remove variable.
920 (static_dtor_list): Remove variable.
921 (register_moduleinfo): Directly set DECL_STATIC_CONSTRUCTOR on
922 dso_ctor, and DECL_STATIC_DESTRUCTOR on dso_dtor.
923 (d_finish_compilation): Remove static ctor/dtor handling.
925 2021-03-06 Iain Buclaw <ibuclaw@gdcproject.org>
927 * d-lang.cc (d_init_options_struct): Don't set default
930 2021-03-03 Iain Buclaw <ibuclaw@gdcproject.org>
933 * dmd/MERGE: Merge upstream dmd a3c9bf422.
935 2021-02-13 Iain Buclaw <ibuclaw@gdcproject.org>
937 * dmd/MERGE: Merge upstream dmd 7132b3537.
938 * Make-lang.in (D_FRONTEND_OBJS): Add d/dsymbolsem.o, d/semantic2.o,
939 d/semantic3.o, and d/templateparamsem.o.
940 * d-compiler.cc (Compiler::genCmain): Update calls to semantic
941 entrypoint functions.
942 * d-lang.cc (d_parse_file): Likewise.
943 * typeinfo.cc (make_frontend_typeinfo): Likewise.
945 2021-02-05 Iain Buclaw <ibuclaw@gdcproject.org>
947 * d-tree.h (DEF_D_INTRINSIC): Don't insert INTRINSIC_ into the
949 * intrinsics.cc (DEF_D_INTRINSIC): Don't insert INTRISIC_ and
950 BUILT_IN_ into the intrinsic and built-in code names.
951 * intrinsics.def: Explicitly use full intrinsic and built-in
952 codes in all definitions.
954 2021-02-04 Iain Buclaw <ibuclaw@gdcproject.org>
956 * dmd/MERGE: Merge upstream dmd 46133f761.
957 * d-builtins.cc (d_build_builtins_module): Set builtins as BUILTINgcc.
958 (maybe_set_builtin_1): Likewise.
959 * d-frontend.cc (eval_builtin): Adjust condition for early return.
960 * intrinsics.cc (maybe_set_intrinsic): Set intrinsics as BUILTINgcc.
961 (maybe_expand_intrinsic): Add case for INTRINSIC_BSWAP16.
962 * intrinsics.def (INTRINSIC_BT): Update signature.
963 (INTRINSIC_BT64): Likewise.
964 (INTRINSIC_BSWAP16): New intrinsic.
965 (INTRINSIC_VLOAD8): Update module.
966 (INTRINSIC_VLOAD16): Likewise.
967 (INTRINSIC_VLOAD32): Likewise.
968 (INTRINSIC_VLOAD64): Likewise.
969 (INTRINSIC_VSTORE8): Likewise.
970 (INTRINSIC_VSTORE16): Likewise.
971 (INTRINSIC_VSTORE32): Likewise.
972 (INTRINSIC_VSTORE64): Likewise.
973 (INTRINSIC_ADDS): Update signature.
974 (INTRINSIC_ADDSL): Likewise.
975 (INTRINSIC_ADDU): Likewise.
976 (INTRINSIC_ADDUL): Likewise.
977 (INTRINSIC_SUBS): Likewise.
978 (INTRINSIC_SUBSL): Likewise.
979 (INTRINSIC_SUBU): Likewise.
980 (INTRINSIC_SUBUL): Likewise.
981 (INTRINSIC_MULS): Likewise.
982 (INTRINSIC_MULSL): Likewise.
983 (INTRINSIC_MULU): Likewise.
984 (INTRINSIC_MULUI): Likewise.
985 (INTRINSIC_MULUL): Likewise.
986 (INTRINSIC_NEGS): Likewise.
987 (INTRINSIC_NEGSL): Likewise.
989 2021-02-02 Iain Buclaw <ibuclaw@gdcproject.org>
992 * dmd/MERGE: Merge upstream dmd 5e2a81d9c.
994 2021-01-30 Iain Buclaw <ibuclaw@gdcproject.org>
996 * typeinfo.cc (TypeInfoVisitor::visit (TypeInfoDeclaration *)): Don't
997 layout m_arg1 and m_arg2 fields.
999 2021-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
1001 * dmd/MERGE: Merge upstream dmd 609c3ce2d.
1002 * d-compiler.cc (Compiler::loadModule): Rename to ...
1003 (Compiler::onParseModule): ... this.
1004 (Compiler::onImport): New function.
1005 * d-lang.cc (d_parse_file): Remove call to Compiler::loadModule.
1007 2021-01-21 Iain Buclaw <ibuclaw@gdcproject.org>
1009 * dmd/MERGE: Merge upstream dmd 3a7ebef73.
1011 2021-01-11 Iain Buclaw <ibuclaw@gdcproject.org>
1013 * dmd/MERGE: Merge upstream dmd 2d3d13748.
1014 * d-lang.cc (d_handle_option): Remove OPT_ftransition_checkimports and
1015 OPT_ftransition_import.
1016 * gdc.texi (Warnings): Remove documentation for -ftransition=import
1017 and -ftransition=checkimports.
1018 * lang.opt (ftransition=checkimports): Remove.
1019 (ftransition=import): Remove.
1021 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
1023 * dmd/MERGE: Merge upstream dmd cb1106ad5.
1025 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
1027 * dmd/MERGE: Merge upstream dmd 9bba772fa.
1029 2021-01-09 Iain Buclaw <ibuclaw@gdcproject.org>
1031 * dmd/MERGE: Merge upstream dmd e598f69c0.
1033 2021-01-07 Iain Buclaw <ibuclaw@gdcproject.org>
1035 * dmd/MERGE: Merge upstream dmd 9038e64c5.
1036 * d-builtins.cc (build_frontend_type): Update call to
1039 2021-01-05 Iain Buclaw <ibuclaw@gdcproject.org>
1041 * dmd/MERGE: Merge upstream dmd a5c86f5b9.
1042 * d-builtins.cc (d_eval_constant_expression): Handle ADDR_EXPR trees
1043 created by build_string_literal.
1044 * d-frontend.cc (retStyle): Remove function.
1045 * d-target.cc (d_language_target_info): New variable.
1046 (d_target_info_table): Likewise.
1047 (Target::_init): Initialize d_target_info_table.
1048 (Target::isReturnOnStack): New function.
1049 (d_add_target_info_handlers): Likewise.
1050 (d_handle_target_cpp_std): Likewise.
1051 (d_handle_target_cpp_runtime_library): Likewise.
1052 (Target::getTargetInfo): Likewise.
1053 * d-target.h (struct d_target_info_spec): New type.
1054 (d_add_target_info_handlers): Declare.
1056 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1058 * gdc.texi: Bump @copyrights-d year.
1060 2021-01-01 Jakub Jelinek <jakub@redhat.com>
1062 * ChangeLog-2020: Rotate ChangeLog. New file.
1064 Copyright (C) 2021 Free Software Foundation, Inc.
1066 Copying and distribution of this file, with or without modification,
1067 are permitted in any medium without royalty provided the copyright
1068 notice and this notice are preserved.