From: Andre Vehreschild Date: Wed, 21 Aug 2024 09:22:57 +0000 (+0200) Subject: Remove unnecessary view_convert obsoleted by [PR86468]. X-Git-Tag: basepoints/gcc-16~6454 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0636de8c5202d8fe58af42afdf24dd93d1a90abd;p=thirdparty%2Fgcc.git 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 --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) {