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

--- Comment #18 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Thomas Koenig <[email protected]>:

https://gcc.gnu.org/g:d8da319fd0607d8035a2936da474dbb675555e8a

commit r17-1932-gd8da319fd0607d8035a2936da474dbb675555e8a
Author: Thomas Koenig <[email protected]>
Date:   Fri Jun 19 17:35:37 2026 +0200

    Remove some wrong unused warnings, do not issue warnings if there are
errors.

    This patch fixes to omissions when variables were not set as referenced
    and removes the warnings if errors have previously been issued.

    gcc/fortran/ChangeLog:

            PR fortran/30438
            PR fortran/125801
            * io.cc (gfc_resolve_dt): Set internal unit as used on read.o
            * resolve.cc (resolve_transfer): Move setting value as used
            before possible early return.
            (gfc_resolve): Only call warn_unused_vs_set if there are no
            pending errors.

    gcc/testsuite/ChangeLog:

            PR fortran/30438
            PR fortran/125801
            * gfortran.dg/warn_unused_but_set_error_1.f90: New test.
            * gfortran.dg/warn_unused_intent_out_2.f90: New test.

Reply via email to