* [committed] d: Clean-up unused variable assignments after interface change
@ 2023-10-31 11:34 Iain Buclaw
0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2023-10-31 11:34 UTC (permalink / raw)
To: gcc-patches; +Cc: Iain Buclaw
Hi,
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.
Bootstrapped and regression tested on x86_64-linux-gnu/-m32, committed
to mainline.
Regards,
Iain.
---
gcc/d/ChangeLog:
* expr.cc (ExprVisitor::visit (NewExp *)): Remove unused assignments.
---
gcc/d/expr.cc | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index ef4ea60ffed..17801a3bd1e 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)
--
2.39.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-31 11:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-31 11:34 [committed] d: Clean-up unused variable assignments after interface change Iain Buclaw
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).