From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19966 invoked by alias); 8 Mar 2014 11:42:25 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19918 invoked by uid 48); 8 Mar 2014 11:42:20 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/60447] Empty .s file created when using -E flag Date: Sat, 08 Mar 2014 11:42:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: trivial X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-03/txt/msg00657.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60447 Tobias Burnus 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 --- 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).