Hi all, attached small patch removes a VIEW_CONVERT that I erroneously inserted during patching pr110033. PR86468 fixes the (co-)rank computation and therefore this VIEW_CONVERT is IMO obsolete. I think it may cause hard to find runtime bugs in the future and therefore like to remove it.
Regtests ok on x86_64-pc-linux-gnu. Ok for mainline? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de
From 3a83901e64568967600d5ba643723ae2ad80e0ac Mon Sep 17 00:00:00 2001 From: Andre Vehreschild <ve...@gcc.gnu.org> Date: Wed, 21 Aug 2024 11:22:57 +0200 Subject: [PATCH] [Fortran] Remove unnecessary view_convert obsoleted by [PR86468]. 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/fortran/trans-stmt.cc b/gcc/fortran/trans-stmt.cc index 023b1739b85..d92ca6477e4 100644 --- a/gcc/fortran/trans-stmt.cc +++ b/gcc/fortran/trans-stmt.cc @@ -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) { -- 2.46.0