This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/60447] Empty .s file created when using -E flag
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 08 Mar 2014 11:42:18 +0000
- Subject: [Bug fortran/60447] Empty .s file created when using -E flag
- Auto-submitted: auto-generated
- References: <bug-60447-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60447
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-03-08
CC| |burnus at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> ---
gcc/fortran/options.c's gfc_post_options contains:
/* 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;
* * *
If one returns true, it indeed fails with a segfault.
* * *
For C, its LANG_HOOKS_INIT (= c_objc_common_init) has:
if (c_common_init () == false)
return false;
which returns "false" for flag_preprocess_only.
I think, we have to do something similar for gfortran's LANG_HOOKS_INIT (=
gfc_init).