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]

[PATCH] fortran/27981


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


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