https://gcc.gnu.org/g:0636de8c5202d8fe58af42afdf24dd93d1a90abd
commit r15-3099-g0636de8c5202d8fe58af42afdf24dd93d1a90abd Author: Andre Vehreschild <ve...@gcc.gnu.org> Date: Wed Aug 21 11:22:57 2024 +0200 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. Diff: --- 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 023b1739b858..d92ca6477e4e 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) {