From 9c7d5e8846edb28e5421211ee8eaad93e234de2c Mon Sep 17 00:00:00 2001 From: Iain Buclaw Date: Fri, 10 Dec 2021 03:14:20 +0100 Subject: d: Merge upstream dmd 3982604c5, druntime bc58b1e9, phobos 12329adb6. D front-end changes: - Import dmd mainline development. - Split off enum EXP from enum TOK. - Integer promotions now follow C integral promotions by default. - Implements __traits(initSymbol). - Lowering of array construction has been moved to the dmd front-end. - Fix segfault in dmd.lexer from unaligned read (PR103529). Druntime changes: - Import druntime mainline development. - Define SIG_BLOCK for Solaris (PR103528). Phobos changes: - Import phobos mainline development. gcc/d/ChangeLog: PR d/103529 * dmd/MERGE: Merge upstream dmd 3982604c5. * Make-lang.in (D_FRONTEND_OBJS): Add d/root-optional.o. * d-attribs.cc (build_attributes): Update for new front-end interface. * d-codegen.cc (d_build_call): Likewise. * d-compiler.cc (Compiler::paintAsType): Likewise. * d-lang.cc (d_handle_option): Remove OPT_fpreview_intpromote, add handling of OPT_frevert_intpromote. * d-port.cc (Port::valcpy): Assert buffer is aligned. * d-target.cc (Target::isVectorOpSupported): Update for new front-end interface. * decl.cc (layout_class_initializer): Likewise. * expr.cc (lvalue_p): Likewise. (binop_assignment): Likewise. (ExprVisitor::visit): Likewise. (ExprVisitor::visit (AssignExp *)): Remove generation of _d_arrayctor and _d_arraysetctor library helpers. (ExprVisitor::visit (VarExp *)): Support __traits(initSymbol). * intrinsics.cc (expand_intrinsic_rotate): Update for new front-end interface. * lang.opt (fpreview=intpromote): Remove. (frevert=intpromote): New. * runtime.def (ARRAYCTOR): Remove. (ARRAYSETCTOR): Remove. * toir.cc (IRVisitor::visit): Update for new front-end interface. * types.cc (layout_aggregate_members): Likewise. * dmd/root/optional.d: New file. * dmd/root/optional.h: New file. libphobos/ChangeLog: PR d/103528 * libdruntime/MERGE: Merge upstream druntime bc58b1e9. * libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Remove core/sys/linux/syscalls.d. * libdruntime/Makefile.in: Regenerate. * src/MERGE: Merge upstream phobos 12329adb6. * testsuite/libphobos.config/config.exp: Add test22523. * libdruntime/core/sys/linux/syscalls.d: Removed. * testsuite/libphobos.config/test22523.d: New test. --- gcc/d/d-codegen.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/d/d-codegen.cc') diff --git a/gcc/d/d-codegen.cc b/gcc/d/d-codegen.cc index c082ac5..39c3c6c 100644 --- a/gcc/d/d-codegen.cc +++ b/gcc/d/d-codegen.cc @@ -2154,9 +2154,9 @@ d_build_call (TypeFunction *tf, tree callable, tree object, { Lagain: Expression *arg = (*arguments)[i]; - gcc_assert (arg->op != TOKtuple); + gcc_assert (arg->op != EXP::tuple); - if (arg->op == TOKcomma) + if (arg->op == EXP::comma) { CommaExp *ce = arg->isCommaExp (); tree tce = build_expr (ce->e1); @@ -2200,7 +2200,7 @@ d_build_call (TypeFunction *tf, tree callable, tree object, /* Nested structs also have ADDRESSABLE set, but if the type has neither a copy constructor nor a destructor available, then we need to take care of copying its value before passing it. */ - if (arg->op == TOKstructliteral || (!sd->postblit && !sd->dtor)) + if (arg->op == EXP::structLiteral || (!sd->postblit && !sd->dtor)) targ = force_target_expr (targ); targ = convert (build_reference_type (TREE_TYPE (targ)), -- cgit v1.1