]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove unnecessary view_convert obsoleted by [PR86468].
authorAndre Vehreschild <vehre@gcc.gnu.org>
Wed, 21 Aug 2024 09:22:57 +0000 (11:22 +0200)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Fri, 23 Aug 2024 06:52:33 +0000 (08:52 +0200)
This patch removes an unnecessary view_convert in trans_associate to
prevent hard to find runtime errors in the future.  The view_convert was
erroneously introduced not understanding why ranks of the arrays to
assign are different.  The ranks are fixed by PR86468 now and the
view_convert is obsolete.

gcc/fortran/ChangeLog:

PR fortran/86468

* trans-stmt.cc (trans_associate_var): Remove superfluous
view_convert.

gcc/fortran/trans-stmt.cc

index 023b1739b858a23ff2a2985874a095f522ab7e92..d92ca6477e4e79d504f629144bdf22a63005c606 100644 (file)
@@ -2031,9 +2031,7 @@ trans_associate_var (gfc_symbol *sym, gfc_wrapped_block *block)
                          gfc_class_data_get (GFC_DECL_SAVED_DESCRIPTOR (tmp)));
        }
       else
-       gfc_add_modify (&se.pre, sym->backend_decl,
-                       build1 (VIEW_CONVERT_EXPR,
-                               TREE_TYPE (sym->backend_decl), se.expr));
+       gfc_add_modify (&se.pre, sym->backend_decl, se.expr);
 
       if (unlimited)
        {