aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-09-26 09:30:08 +0000
committerGitHub <noreply@github.com>2022-09-26 09:30:08 +0000
commit8ed1bbaa40527c561b25b5dadb963ca404f2da37 (patch)
treeb68241b6d5b2361edc1b6352e503660602c28885 /gcc/d/expr.cc
parent6d98713a7b9cc58573be3e209a27a6c4ce682166 (diff)
parent033a4599350d23d55f5e9a0f9adf497e7f0279e8 (diff)
downloadgcc-8ed1bbaa40527c561b25b5dadb963ca404f2da37.zip
gcc-8ed1bbaa40527c561b25b5dadb963ca404f2da37.tar.gz
gcc-8ed1bbaa40527c561b25b5dadb963ca404f2da37.tar.bz2
Merge #1542
1542: Merge GCC mainline/master into gccrs/master r=philberty a=ibuclaw As per title, pull in the latest and greatest from gcc development. Co-authored-by: Tim Lange <mail@tim-lange.me> Co-authored-by: GCC Administrator <gccadmin@gcc.gnu.org> Co-authored-by: Martin Liska <mliska@suse.cz> Co-authored-by: Javier Miranda <miranda@adacore.com> Co-authored-by: Bob Duff <duff@adacore.com> Co-authored-by: Patrick Bernardi <bernardi@adacore.com> Co-authored-by: Steve Baird <baird@adacore.com> Co-authored-by: Gary Dismukes <dismukes@adacore.com> Co-authored-by: Eric Botcazou <ebotcazou@adacore.com> Co-authored-by: Justin Squirek <squirek@adacore.com> Co-authored-by: Piotr Trojanek <trojanek@adacore.com> Co-authored-by: Joffrey Huguet <huguet@adacore.com> Co-authored-by: Yannick Moy <moy@adacore.com>
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r--gcc/d/expr.cc30
1 files changed, 4 insertions, 26 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index 140df7e..b0ce870 100644
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -986,11 +986,9 @@ public:
else if ((postblit || destructor)
&& e->op != EXP::blit && e->op != EXP::construct)
{
- /* Generate: _d_arrayassign(ti, from, to); */
- this->result_ = build_libcall (LIBCALL_ARRAYASSIGN, e->type, 3,
- build_typeinfo (e, etype),
- d_array_convert (e->e2),
- d_array_convert (e->e1));
+ /* Assigning to a non-trivially copyable array has already been
+ handled by the front-end. */
+ gcc_unreachable ();
}
else
{
@@ -1124,27 +1122,7 @@ public:
/* All other kinds of lvalue or rvalue static array assignment.
Array construction has already been handled by the front-end. */
gcc_assert (e->op != EXP::construct);
-
- /* Generate: _d_arrayassign_l()
- or: _d_arrayassign_r() */
- libcall_fn libcall = (lvalue)
- ? LIBCALL_ARRAYASSIGN_L : LIBCALL_ARRAYASSIGN_R;
- tree elembuf = build_local_temp (build_ctype (etype));
- Type *arrtype = (e->type->ty == TY::Tsarray)
- ? etype->arrayOf () : e->type;
- tree result = build_libcall (libcall, arrtype, 4,
- build_typeinfo (e, etype),
- d_array_convert (e->e2),
- d_array_convert (e->e1),
- build_address (elembuf));
-
- /* Cast the libcall result back to a static array. */
- if (e->type->ty == TY::Tsarray)
- result = indirect_ref (build_ctype (e->type),
- d_array_ptr (result));
-
- this->result_ = result;
- return;
+ gcc_unreachable ();
}
/* Simple assignment. */