]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
d: Clean-up unused variable assignments after interface change
authorIain Buclaw <ibuclaw@gdcproject.org>
Tue, 31 Oct 2023 11:20:02 +0000 (12:20 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Tue, 31 Oct 2023 11:30:52 +0000 (12:30 +0100)
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.

gcc/d/expr.cc

index ef4ea60ffed933da712b7008320e0dcae7f2a2cb..17801a3bd1ef8e23c307b65b470cab979727daf1 100644 (file)
@@ -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)