]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/60447 (Empty .s file created when using -E flag)
authorTobias Burnus <burnus@net-b.de>
Sat, 8 Mar 2014 18:53:18 +0000 (19:53 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Sat, 8 Mar 2014 18:53:18 +0000 (19:53 +0100)
2014-03-08  Tobias Burnus  <burnus@net-b.de>

        PR fortran/60447
        * f95-lang.c (gfc_init): Return false when only
        preprocessing.
        * options.c (gfc_post_options): Ditto.

From-SVN: r208431

gcc/fortran/ChangeLog
gcc/fortran/f95-lang.c
gcc/fortran/options.c

index 118c5ded775e1905e7c2b828f74a08520cda57d1..872a4a3dd57b21d5cb05b12e08170f66b862528b 100644 (file)
@@ -1,3 +1,10 @@
+2014-03-08  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/60447
+       * f95-lang.c (gfc_init): Return false when only
+       preprocessing.
+       * options.c (gfc_post_options): Ditto.
+
 2014-03-08  Tobias Burnus  <burnus@net-b.de>
 
        * gfortran.texi (Fortran 2003 Status): Mention finalization,
index aa49ea0465694ca56baf6865290dd219beca651d..e25e92a5533629986a4bec8334f762d9e5834829 100644 (file)
@@ -223,6 +223,9 @@ gfc_init (void)
   if (!gfc_new_file ())
     fatal_error ("can't open input file: %s", gfc_source_file);
 
+  if (flag_preprocess_only)
+    return false;
+
   return true;
 }
 
index 895a7dc4d39cb05469f9f7d001d814418cfaf784..a2b91ca0aceea86d70f586c6752660f386a22dbe 100644 (file)
@@ -437,14 +437,7 @@ gfc_post_options (const char **pfilename)
 
   gfc_cpp_post_options ();
 
-/* FIXME: return gfc_cpp_preprocess_only ();
-
-   The return value of this function indicates whether the
-   backend needs to be initialized. On -E, we don't need
-   the backend. However, if we return 'true' here, an
-   ICE occurs. Initializing the backend doesn't hurt much,
-   hence, for now we can live with it as is.  */
-  return false;
+  return gfc_cpp_preprocess_only ();
 }