[Bug fortran/117897] [13/14/15 Regression] Bug in gfortran compiled windows run time with the latest release (14.2.0)

pault at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Dec 14 09:05:40 GMT 2024


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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
After 7 bisections, I found that I was the culprit with my finalization patch:

            PR fortran/103854
            PR fortran/96122
            PR fortran/37336

commit r13-6747-gd7caf313525a46f200d7f5db1ba893f853774aee
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Sat Mar 18 07:56:23 2023 +0000

The bug has been dormant for 22 months then... or it hasn't been reported.

Taking the diff between working and broken versions of the original tree dump
shows:
1324c1324
<             __result_get_pt_materiau_nom = cds_pt_materiau
(&vector_element.52);
---
>             cds_pt_materiau (&vector_element.52)._vptr->_copy (&cds_pt_materiau (&vector_element.52), &__result_get_pt_materiau_nom);

The use of the vptr copy for the function result is the problem. This is
clearly not a good idea for a pointer function result since it attempts to
effect a deep copy.

Taking the PR.

Paul


More information about the Gcc-bugs mailing list