This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[gfortran, patch] fix ICE with missing format label error.


Hi, all
  This patch fixed an ICE with missing format label.
  This is the test program:

Program test
format (I4)
end

  Paul, can you check it?
  
  The Changlog entry:

2003-11-26  Feng Wang  <fengwang@nudt.edu.cn>

        * io.c (gfc_match_format): Check if missing 
format label.


*** gcc/gcc/fortran/io.c	Sun Sep 14 09:13:30 2003
--- ../gcc/gcc/fortran/io.c	Tue Nov 25 22:21:54 2003
*************** gfc_match_format (void)
*** 771,776 ****
--- 771,781 ----
    gfc_expr *e;
    locus start;
  
+   if (gfc_statement_label == NULL)
+     {
+       gfc_error ("Missing format label at %C");
+       return MATCH_ERROR;
+     }
    gfc_gobble_whitespace ();
  
    mode = MODE_FORMAT;

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