[PR126816] Fix use-after-free of charlen from rejected trial

Jerry D <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.fortran
Message-ID <[email protected]>
Committed as simple and obvious.

Regards,

Jerry

The master branch has been updated by Jerry DeLisle <[email protected]>:

https://gcc.gnu.org/g:0a59650d1ec84d0e155670ef5ae226e4c59ba748

commit r17-3389-g0a59650d1ec84d0e155670ef5ae226e4c59ba748
Author: Jerry DeLisle <[email protected]>
Date:   Tue Aug 18 09:46:21 2026 -0700

     fortran: [PR126816] Fix use-after-free of charlen from rejected trial

     restore_old_symbol reverted only ts.type/ts.kind when undoing a
     tentative symbol change, leaving ts.u.cl pointing at whatever
     charlen the rejected trial had allocated via gfc_set_default_type.
     Restore the whole typespec instead.

             PR fortran/126816

     gcc/fortran/ChangeLog:

             * symbol.cc (restore_old_symbol): Restore the whole typespec
             instead of just type and kind.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.