Commit 89031799 by Tobias Schlüter

re PR fortran/26277 (false warning about unused label for a warning used in err=)

fortran/
	PR fortran/26277
	* io.c (match_ltag): Mark label as referenced.
testsuite/
	PR fortran/26277
	* gfortran.dg/label_4.f90: New.

From-SVN: r110993
parent fb9c6d49
2006-02-14 Tobias Schlter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/26277
* io.c (match_ltag): Mark label as referenced.
2006-02-14 Jakub Jelinek <jakub@redhat.com>
Richard Henderson <rth@redhat.com>
Diego Novillo <dnovillo@redhat.com>
......
......@@ -972,6 +972,10 @@ match_ltag (const io_tag * tag, gfc_st_label ** label)
return MATCH_ERROR;
}
if (m == MATCH_YES
&& gfc_reference_st_label (*label, ST_LABEL_TARGET) == FAILURE)
return MATCH_ERROR;
return m;
}
......
2006-02-14 Tobias Schlter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/26277
* gfortran.dg/label_4.f90: New.
2006-02-14 Jakub Jelinek <jakub@redhat.com>
Diego Novillo <dnovillo@redhat.com>
Uros Bizjak <uros@kss-loka.si>
! { dg-do compile }
! { dg-options "-Wunused-labels" }
! PR 26277
! We used to give an incorect warning about label 99 not being referenced
open(unit=12,err=99)
99 print *,"could not open file ..."
98 continue ! { dg-warning "Label 98 .* defined but not used" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment