This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gfortran, patch] fix ICE with missing format label error.
- From: Feng Wang <fengwang at nudt dot edu dot cn>
- To: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot or
- Date: Wed, 26 Nov 2003 08:53:49 +0800 (HKT)
- Subject: [gfortran, patch] fix ICE with missing format label error.
- Reply-to: Feng Wang <fengwang at nudt dot edu dot cn>
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;