If a label appeared in an IO-tag, it wasn't marked as a referenced
ST_LABEL_TARGET, which lead to a spurious warning about the label being
unreferenced. Fixed by the patch you find below.
Built & tested, new testcase attached. Ok?
- Tobi
2006-02-14 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/26277
* io.c (match_ltag): Mark label as referenced.
Index: io.c
===================================================================
--- io.c (revision 110963)
+++ io.c (working copy)
@@ -972,6 +972,10 @@ match_ltag (const io_tag * tag, gfc_st_l
return MATCH_ERROR;
}
+ if (m == MATCH_YES
+ && gfc_reference_st_label (*label, ST_LABEL_TARGET) == FAILURE)
+ return MATCH_ERROR;
+
return m;
}