From: Tobias Burnus Date: Sat, 8 Mar 2014 18:53:18 +0000 (+0100) Subject: re PR fortran/60447 (Empty .s file created when using -E flag) X-Git-Tag: releases/gcc-4.9.0~522 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=566916e637118be03f39eaee85ceacf958839c46;p=thirdparty%2Fgcc.git re PR fortran/60447 (Empty .s file created when using -E flag) 2014-03-08 Tobias Burnus PR fortran/60447 * f95-lang.c (gfc_init): Return false when only preprocessing. * options.c (gfc_post_options): Ditto. From-SVN: r208431 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 118c5ded775e..872a4a3dd57b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2014-03-08 Tobias Burnus + + PR fortran/60447 + * f95-lang.c (gfc_init): Return false when only + preprocessing. + * options.c (gfc_post_options): Ditto. + 2014-03-08 Tobias Burnus * gfortran.texi (Fortran 2003 Status): Mention finalization, diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index aa49ea046569..e25e92a55336 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -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; } diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 895a7dc4d39c..a2b91ca0acee 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -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 (); }