gnu/gcc/d8da319fd0607d8035a2936da474dbb675555e8a 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.
4 files changed