Possible fix for 18452
Asher Langton
langton2@llnl.gov
Sat Jul 16 00:56:00 GMT 2005
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18452
This bug is involves extra -f* options being passed on to cc1 when a
file is preprocessed. In lang-spec.h, we have:
{"@f95-cpp-input",
"cc1 -E -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options) \
%{E|M|MM:%(cpp_debug_options)}\
%{!M:%{!MM:%{!E: -o %|.f95 |\n\
f951 %|.f95 %(cc1_options) %{J*} %{I*}\
%{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},
The problem seems to be the spec string cpp_options (output from -dumpspecs):
*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*}
%{w} %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}}
%{O*} %{undef} %{save-temps:-fpch-preprocess}
All of the -f* options are being passed along to cc1. As a fix
(though not very elegant), we can define a new spec string in place
of cpp_options, replacing
"%{f*}"
with something like
"%{funderscoring|fsecond_underscore|...|fimplicit-none: ; f*:f%*}"
Unfortunately, this requires specifiying all of the flags we don't
want to pass. It might be easier to just replace %{f*} with an
explicit list of the flags that should be passed, but changes to cc1
might require updating this list, and so this approach would be
harder to maintain
Any comments or suggestions?
-Asher
PS: The Cray Pointer patch should be released very soon. I'm just
waiting for the paperwork at this point.
--
Asher Langton
Institute for Scientific Computing Research
Lawrence Livermore National Laboratory
P.O. Box 808, L-312
Livermore, CA 94551
langton2@llnl.gov
More information about the Fortran
mailing list