]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/47394 (Internal compiler error when error count limit is reached)
authorTobias Burnus <burnus@net-b.de>
Fri, 21 Jan 2011 22:38:55 +0000 (23:38 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Fri, 21 Jan 2011 22:38:55 +0000 (23:38 +0100)
2011-01-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/47394
        * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
        Use defined instead of magic number exit status codes.
        * scanner.c (include_line, gfc_new_file): Ditto.
        * gfortranspec.c (lang_specific_driver): Ditto.

From-SVN: r169109

gcc/fortran/ChangeLog
gcc/fortran/error.c
gcc/fortran/gfortranspec.c
gcc/fortran/scanner.c

index 7faa1584113c99f36da177afc91d15b41a654b0f..ad7abc5752bf01e81db8d0b7513461242f05767b 100644 (file)
@@ -1,3 +1,11 @@
+2011-01-21  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/47394
+       * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
+       Use defined instead of magic number exit status codes.
+       * scanner.c (include_line, gfc_new_file): Ditto.
+       * gfortranspec.c (lang_specific_driver): Ditto.
+
 2011-01-16  Jakub Jelinek  <jakub@redhat.com>
 
        Backport from mainline
index b05e669c3707689580e29b6ba4367ee4209a1fdf..4d85fdcf2522f52bed9ade3eaaefdc487f71b164 100644 (file)
@@ -939,7 +939,7 @@ gfc_error_now (const char *gmsgid, ...)
   buffer_flag = i;
 
   if (flag_fatal_errors)
-    exit (1);
+    exit (FATAL_EXIT_CODE);
 }
 
 
@@ -956,7 +956,7 @@ gfc_fatal_error (const char *gmsgid, ...)
   error_print (_("Fatal Error:"), _(gmsgid), argp);
   va_end (argp);
 
-  exit (3);
+  exit (FATAL_EXIT_CODE);
 }
 
 
@@ -1019,7 +1019,7 @@ gfc_error_check (void)
       gfc_increment_error_count();
 
       if (flag_fatal_errors)
-       exit (1);
+       exit (FATAL_EXIT_CODE);
     }
 
   return rc;
index d6d4477cda5b0146d8dc3cd8fd6f60f184536ec5..14bd86ef60e54d016663e1f6eba61bcafd25229d 100644 (file)
@@ -375,7 +375,7 @@ lang_specific_driver (int *in_argc, const char *const **in_argv,
 You may redistribute copies of GNU Fortran\n\
 under the terms of the GNU General Public License.\n\
 For more information about these matters, see the file named COPYING\n\n"));
-         exit (0);
+         exit (SUCCESS_EXIT_CODE);
          break;
 
        case OPTION_help:
index 9abd2d7b447bc581019434c68864397b5734c8ff..3d259a8ef0443083c2b6c7933585f59622e81d6c 100644 (file)
@@ -1841,7 +1841,7 @@ include_line (gfc_char_t *line)
 
   filename = gfc_widechar_to_char (begin, -1);
   if (load_file (filename, NULL, false) == FAILURE)
-    exit (1);
+    exit (FATAL_EXIT_CODE);
 
   gfc_free (filename);
   return true;
@@ -2045,7 +2045,7 @@ gfc_new_file (void)
     printf ("%s:%3d %s\n", LOCATION_FILE (line_head->location),
            LOCATION_LINE (line_head->location), line_head->line);
 
-  exit (0);
+  exit (SUCCESS_EXIT_CODE);
 #endif
 
   return result;