diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2024-08-21 11:22:57 +0200 |
---|---|---|
committer | Andre Vehreschild <vehre@gcc.gnu.org> | 2024-08-23 08:52:33 +0200 |
commit | 0636de8c5202d8fe58af42afdf24dd93d1a90abd (patch) | |
tree | 1e3d036b24624c7041e3bd24f5b0790c8fcc8d20 | |
parent | f6b10fe45b9b704fd6a7124ab02c6e6cbd8efce4 (diff) | |
download | gcc-0636de8c5202d8fe58af42afdf24dd93d1a90abd.zip gcc-0636de8c5202d8fe58af42afdf24dd93d1a90abd.tar.gz gcc-0636de8c5202d8fe58af42afdf24dd93d1a90abd.tar.bz2 |
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.
-rw-r--r-- | gcc/fortran/trans-stmt.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/fortran/trans-stmt.cc b/gcc/fortran/trans-stmt.cc index 023b173..d92ca64 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) { |