[PATCH] PR123012 Namelist input of variable accessed by use association with renaming fails

Jerry D jvdelisle2@gmail.com
Wed Jan 7 23:52:33 GMT 2026


Planning to commit this soon.

Patch developed by Steve. I did one fix-up after reading that
giving strlen a NULL pointer can be undefined on some systems.

Regression tested on x86_64-linux-gnu.

Thanks Steve.

Regards all,

Jerry

$ git show
commit 2df097c4934ac47eadbd8b9b5d23e7bec8bb1049 (HEAD -> master)
Author: Steve Kargl <kargl@gcc.gnu.org>
Date:   Wed Jan 7 15:14:23 2026 -0800

     Fortran: Fix namelist with use association and renaming

             PR fortran/123012

     gcc/fortran/ChangeLog:

             * trans-io.cc (transfer_namelist_element): Adjust the
             conditions determining when to use the local name or
             the var name to build the object name.

     gcc/testsuite/ChangeLog:

             * gfortran.dg/namelist_99.f90: New test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr123012-final.diff
Type: text/x-patch
Size: 2627 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20260107/a48451b7/attachment.bin>


More information about the Gcc-patches mailing list