diff mbox

[committed] PR fortran/46140 -- exit with nonzero status

Message ID 20101025161427.GA1843@troutmask.apl.washington.edu
State New
Headers show

Commit Message

Steve Kargl Oct. 25, 2010, 4:14 p.m. UTC
After regression testing on 4.4, 4.5, and trunk, and
after approval from Tobias Burnus in the PR, I have
committed

2010-10-25  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/46140
	* fortran/scanner.c (include_line): Check return value of load_file.

to the 4.4 and 4.5 branches and to trunk.  The patch
is attached.
diff mbox

Patch

Index: gcc/fortran/scanner.c
===================================================================
--- gcc/fortran/scanner.c	(revision 165917)
+++ gcc/fortran/scanner.c	(working copy)
@@ -1867,7 +1867,9 @@  include_line (gfc_char_t *line)
 		   read by anything else.  */
 
   filename = gfc_widechar_to_char (begin, -1);
-  load_file (filename, NULL, false);
+  if (load_file (filename, NULL, false) == FAILURE)
+    exit (1);
+
   gfc_free (filename);
   return true;
 }