aboutsummaryrefslogtreecommitdiff
path: root/gcc/d
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2023-10-31 12:20:02 +0100
committerIain Buclaw <ibuclaw@gdcproject.org>2023-10-31 12:30:52 +0100
commit1cf5dc05c678232b52ac0572a94b891131ef48f0 (patch)
treedb93d781470a523b47d33e736fe053ea8308cbfd /gcc/d
parent6bf2cebe2bf49919c78814cb447d3aa6e3550d89 (diff)
downloadgcc-1cf5dc05c678232b52ac0572a94b891131ef48f0.zip
gcc-1cf5dc05c678232b52ac0572a94b891131ef48f0.tar.gz
gcc-1cf5dc05c678232b52ac0572a94b891131ef48f0.tar.bz2
d: Clean-up unused variable assignments after interface change
The lowering done for invoking `new' on a single dimension array was moved from the code generator to the front-end semantic pass in r14-4996. This removes the detritus left behind in the code generator from that deletion. gcc/d/ChangeLog: * expr.cc (ExprVisitor::visit (NewExp *)): Remove unused assignments.
Diffstat (limited to 'gcc/d')
-rw-r--r--gcc/d/expr.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index ef4ea60..17801a3 100644
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -2357,9 +2357,6 @@ public:
else if (tb->ty == TY::Tarray)
{
/* Allocating memory for a new D array. */
- tb = e->newtype->toBasetype ();
- TypeDArray *tarray = tb->isTypeDArray ();
-
gcc_assert (e->arguments && e->arguments->length >= 1);
if (e->arguments->length == 1)
@@ -2403,7 +2400,8 @@ public:
size_int (e->arguments->length),
build_address (var));
- result = build_libcall (libcall, tb, 2, tinfo, dims);
+ result = build_libcall (libcall, e->newtype->toBasetype (), 2,
+ tinfo, dims);
}
if (e->argprefix)