https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127591

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
The issue was fixed by the patch for PR121616 (r16-3809?, Harald
Anlauf, 2025-09-11): "Fortran: fix assignment to allocatable scalar
polymorphic component".  gfc_variable_attr gave a scalar CLASS
component of an array element (s(i)%x) the dimension attribute of
the array reference, so s(4)%x = s(1)%x was mis-compiled.

It was backported to all open branches and is in 13.5.0, 14.4.0,
15.3.0 and 16.1.0:

  trunk     0899b826f71
  gcc-15    9bfc496528d
  gcc-14    79cb8847859
  gcc-13    98f784357be

Both attached examples (ch28 with ch2806_shape_module.f90, and
ch29) run correctly with 13.4.1, 14.4.1, 15.3.1, 16.2.1 and trunk.
Reverting only the PR121616 change on the gcc-13 branch brings back
the segfault in both.  Closing as a duplicate of PR121616.

*** This bug has been marked as a duplicate of bug 121616 ***

Reply via email to