diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-06-13 10:41:57 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2022-06-13 11:38:10 +0200 |
commit | ec486b739b83ffdbe40c5ececb20d16c94d6b0d0 (patch) | |
tree | 9a3c04628df45a6dca9288e2c44b089c957e426d /gcc/d/expr.cc | |
parent | 13ea4a6e830da1f245136601e636dec62e74d1a7 (diff) | |
download | gcc-ec486b739b83ffdbe40c5ececb20d16c94d6b0d0.zip gcc-ec486b739b83ffdbe40c5ececb20d16c94d6b0d0.tar.gz gcc-ec486b739b83ffdbe40c5ececb20d16c94d6b0d0.tar.bz2 |
d: Merge upstream dmd 821ed393d, druntime 454471d8, phobos 1206fc94f.
D front-end changes:
- Import latest bug fixes to mainline.
D runtime changes:
- Fix duplicate Elf64_Dyn definitions on Solaris.
- _d_newThrowable has been converted to a template.
Phobos changes:
- Import latest bug fixes to mainline.
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 821ed393d.
* expr.cc (ExprVisitor::visit (NewExp *)): Remove handled of
allocating `@nogc' throwable object.
* runtime.def (NEWTHROW): Remove.
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime 454471d8.
* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Add
core/sync/package.d.
* libdruntime/Makefile.in: Regenerate.
* src/MERGE: Merge upstream phobos 1206fc94f.
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r-- | gcc/d/expr.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc index 7edcbc4..179f9a5 100644 --- a/gcc/d/expr.cc +++ b/gcc/d/expr.cc @@ -2238,13 +2238,17 @@ public: new_call = build_nop (type, build_address (var)); setup_exp = modify_expr (var, aggregate_initializer_decl (cd)); } + else if (global.params.ehnogc && e->thrownew) + { + /* Allocating a `@nogc' Exception with `_d_newThrowable' has already + been handled by the front-end. */ + gcc_unreachable (); + } else { /* Generate: _d_newclass() */ tree arg = build_address (get_classinfo_decl (cd)); - libcall_fn libcall = (global.params.ehnogc && e->thrownew) - ? LIBCALL_NEWTHROW : LIBCALL_NEWCLASS; - new_call = build_libcall (libcall, tb, 1, arg); + new_call = build_libcall (LIBCALL_NEWCLASS, tb, 1, arg); } /* Set the context pointer for nested classes. */ |