PR fortran/26277
* io.c (match_ltag): Mark label as referenced.
testsuite/
PR fortran/26277
* gfortran.dg/label_4.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110993
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-02-14 Tobias Schl\81üter <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>
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 Schlüter <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>
--- /dev/null
+! { 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