public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver Date: Fri, 28 Nov 2008 23:04:00 -0000 [thread overview] Message-ID: <20081128230300.27684.qmail@sourceware.org> (raw) In-Reply-To: <bug-37468-16690@http.gcc.gnu.org/bugzilla/> ------- Comment #6 from dfranke at gcc dot gnu dot org 2008-11-28 23:02 ------- In gcc.c (cpp_unique_options) we have "%{i*}" which passes on any -i<something> it might encounter, including -i8. This is why we get an error if preprocessing is enabled, as -i8 is not known. So, the problem is not getting an error with .F, but getting no error with .f! Now, looking for the whereabouts of -i8, one sees with -v that it's not passed to f951, hence it was eaten by the driver?! Interestingly, using -k8, the compiler complains: "unrecognized option '-k8'". In gcc.c (main) we find: /* Now we have the specs. Set the `valid' bits for switches that match anything in any spec. */ validate_all_switches (); Which includes the cpp-spec which uses (cpp_unique_options). Thus, we have a pass interested in the '-i8', namely cpp, which then is never run. In order to make f951 complain about -i*, we need to forward it in the specs. Otherwise it will be simply skipped - to be used with a pass never run. Propsed patch for trunk/4.4 (not regtested yet): Index: lang-specs.h =================================================================== --- lang-specs.h (revision 142255) +++ lang-specs.h (working copy) @@ -23,7 +23,7 @@ #define F951_CPP_OPTIONS "%{!nocpp: -cpp %g.f90 %(cpp_options)\ %{E|M|MM:%(cpp_debug_options) -fsyntax-only} %{E}}" -#define F951_OPTIONS "%(cc1_options) %{J*} %{!cpp: %{I*}}\ +#define F951_OPTIONS "%(cc1_options) %{J*} %{!cpp: %{I*} %{i*}}\ %{!nostdinc:-fintrinsic-modules-path finclude%s}\ %{!fsyntax-only:%(invoke_as)}" #define F951_SOURCE_FORM "%{!ffree-form:-ffixed-form}" -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfranke at gcc dot gnu dot | |org AssignedTo|unassigned at gcc dot gnu |dfranke at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED GCC host triplet|(amd64 - Debian testing - | |gfortran-4.3 | Keywords| |patch Last reconfirmed|2008-09-14 14:20:15 |2008-11-28 23:02:59 date| | Summary|error when combining -i8 |unknown option -i<something> |with .F files |not recognized by gfortran | |driver http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37468
next prev parent reply other threads:[~2008-11-28 23:04 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org 2008-09-10 19:43 ` [Bug fortran/37468] " pinskia at gcc dot gnu dot org 2008-09-11 19:53 ` charles at schwieters dot org 2008-09-14 14:21 ` tkoenig at gcc dot gnu dot org 2008-09-14 15:10 ` dominiq at lps dot ens dot fr 2008-09-14 16:13 ` dominiq at lps dot ens dot fr 2008-11-28 23:04 ` dfranke at gcc dot gnu dot org [this message] 2008-11-28 23:24 ` [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver dfranke at gcc dot gnu dot org 2008-12-02 1:20 ` pinskia at gcc dot gnu dot org 2008-12-09 19:55 ` dfranke at gcc dot gnu dot org 2008-12-09 19:58 ` dfranke at gcc dot gnu dot org 2008-12-25 1:43 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20081128230300.27684.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).