[Bug fortran/114024] ICE allocate statement with source=cmp%re and z an array
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Feb 23 21:39:30 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114024
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Harald Anlauf <anlauf@gcc.gnu.org>:
https://gcc.gnu.org/g:80d126ba99f4b9bc64d4861b3c4bae666497f2d4
commit r14-9160-g80d126ba99f4b9bc64d4861b3c4bae666497f2d4
Author: Steve Kargl <kargl@gcc.gnu.org>
Date: Fri Feb 23 22:05:04 2024 +0100
Fortran: ALLOCATE statement, SOURCE/MOLD expressions with subrefs
[PR114024]
PR fortran/114024
gcc/fortran/ChangeLog:
* trans-stmt.cc (gfc_trans_allocate): When a source expression has
substring references, part-refs, or %re/%im inquiries, wrap the
entity in parentheses to force evaluation of the expression.
gcc/testsuite/ChangeLog:
* gfortran.dg/allocate_with_source_27.f90: New test.
* gfortran.dg/allocate_with_source_28.f90: New test.
Co-Authored-By: Harald Anlauf <anlauf@gmx.de>
More information about the Gcc-bugs
mailing list