]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Remove SAVE_EXPR on lhs in assign [PR108233]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Tue, 25 Feb 2025 13:17:16 +0000 (14:17 +0100)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Wed, 26 Feb 2025 08:26:47 +0000 (09:26 +0100)
commit751b37047b2ad3a358d41ac792487b42430e9901
tree8b1773963c222cfbcfedfa7125c377dc2ceba357
parentebe7cd9f2833a79877fbc56829c4f37a518a9b1d
Fortran: Remove SAVE_EXPR on lhs in assign [PR108233]

With vectorial shaped datatypes like e.g. complex numbers, fold_convert
inserts a SAVE_EXPR.  Using that on the lhs in an assignment prevented
the update of the variable, when in a coarray.

PR fortran/108233

gcc/fortran/ChangeLog:

* trans-expr.cc (gfc_trans_assignment_1): Remove SAVE_EXPR on lhs.

gcc/testsuite/ChangeLog:

* gfortran.dg/coarray/complex_1.f90: New test.
gcc/fortran/trans-expr.cc
gcc/testsuite/gfortran.dg/coarray/complex_1.f90 [new file with mode: 0644]