[PATCH] fortran/27981

Steve Kargl sgk@troutmask.apl.washington.edu
Sat Jun 10 21:17:00 GMT 2006


2006-06-10  Steven G. Kargl  <kargls@comcast.net>

	* match.c (gfc_match_if): Issue error for borked simple if
	statement.

	* gfortran.dg/simpleif_2.f90: New test.

-- 
Steve


Index: match.c
===================================================================
--- match.c	(revision 114541)
+++ match.c	(working copy)
@@ -1056,6 +1056,8 @@
   m = gfc_match_assignment ();
   if (m == MATCH_YES)
     goto got_match;
+  else if (m == MATCH_ERROR)
+    return MATCH_ERROR;
 
   gfc_free_expr (expr);
   gfc_undo_symbols ();


! { dg-do compile }
! PR 27981
program a
   real x
   real, pointer :: y
   if (.true.) x = 12345678901 ! { dg-error "Integer too big" }
end program a



More information about the Gcc-patches mailing list