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).

Reply via email to