This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47486] gfortran -M exits with fatal error when -o option is used
- 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: Thu, 27 Jan 2011 08:32:16 +0000
- Subject: [Bug fortran/47486] gfortran -M exits with fatal error when -o option is used
- Auto-submitted: auto-generated
- References: <bug-47486-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47486
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org,
| |dfranke at gcc dot gnu.org
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-01-27 08:31:56 UTC ---
In the compiler, the file name is handled in cpp.c via
gfc_cpp_option.output_filename -- but that part looks OK.
It seems to be a driver problem as the driver passes:
.../x86_64-unknown-linux-gnu/4.6.0/f951 ... -o test.d ... -o /tmp/cckDPYJ6.s
Thus, either a rule in lang-specs.h is wrong/missing or the problem is in
gfortranspec.c.
I think something like: %{!o*:-o %b.s} is missing and %b.s allways is
implicitly used.
Maybe %(cpp_unique_options) should be used? Currently, lang-specs.h contains
the following:
/* Identical to gcc.c (cpp_options), but omitting %(cpp_unique_options)
and -fpch-preprocess on -save-temps. */
#define CPP_ONLY_OPTIONS "%1 %{m*} %{f*} %{g*:%{!g0:%{g*} \
%{!fno-working-directory:-fworking-directory}}} \
%{std*&ansi&trigraphs} %{W*&pedantic*} %{w} \
%{O*} %{undef}"
The %b.s seems to be defined in gcc.c's cc1_options.