[Bug fortran/104228] [9/10/11 Regression] ICE in df_install_ref, at df-scan.cc:2294 since r8-3589-g707905d0773e5a8e
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Apr 10 18:48:28 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104228
--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Mikael Morin
<mikael@gcc.gnu.org>:
https://gcc.gnu.org/g:3b0f715744d7919ee729d370155a68d5fa97cba9
commit r11-9804-g3b0f715744d7919ee729d370155a68d5fa97cba9
Author: Mikael Morin <mikael@gcc.gnu.org>
Date: Fri Jan 28 22:00:57 2022 +0100
fortran: Unshare associate var charlen [PR104228]
PR104228 showed that character lengths were shared between associate
variable and associate targets. This is problematic when the associate
target is itself a variable and gets a variable to hold the length, as
the length variable is added (and all the variables following it in the
chain)
to both the associate variable scope and the target variable scope.
This caused an ICE when compiling with -O0 -fsanitize=address.
This change forces the creation of a separate character length for the
associate variable. It also forces the initialization of the character
length variable to avoid regressing associate_32 and associate_47 tests.
PR fortran/104228
gcc/fortran/ChangeLog:
* resolve.c (resolve_assoc_var): Also create a new character
length for non-dummy associate targets.
* trans-stmt.c (trans_associate_var): Initialize character length
even if no temporary is used for the associate variable.
gcc/testsuite/ChangeLog:
* gfortran.dg/asan/associate_58.f90: New test.
* gfortran.dg/asan/associate_59.f90: New test.
(cherry picked from commit 57da34939703a6e6d3267a0d25d1fb9369d3ac0e)
More information about the Gcc-bugs
mailing list