This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran] PR26277: Mark label as ST_LABEL_TARGET is appears in I/O tags


Tobias.Schlueter@Physik.Uni-Muenchen.DE wrote:

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;
}



OK!

Thanks

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]