]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: Fix ICE on associate of pointer [PR118789]
authorAndre Vehreschild <vehre@gcc.gnu.org>
Tue, 25 Feb 2025 16:15:47 +0000 (17:15 +0100)
committerAndre Vehreschild <vehre@gcc.gnu.org>
Thu, 27 Feb 2025 08:28:44 +0000 (09:28 +0100)
commit0fc1abcc46ecc34e8d2d7ec7167656ede2cd5690
tree3129899c52d47922944c8edda3c859b06ac72693
parent44c4a72061e86259d3defd3d1c7911f453043e3c
Fortran: Fix ICE on associate of pointer [PR118789]

Fix ICE when associating a pointer to void (c_ptr) by looking at the
compatibility of the type hierarchy.

PR fortran/118789

gcc/fortran/ChangeLog:

* trans-stmt.cc (trans_associate_var): Compare pointed to types when
expr to associate is already a pointer.

gcc/testsuite/ChangeLog:

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