[patch, fortran] Fix PR37468

Tobias Burnus burnus@net-b.de
Thu Dec 4 17:14:00 GMT 2008


Daniel Franke wrote:
> The patch below fixes a user-visible problem with option-parsing and passing. 
> Analysis of the problem can be found in PR37468, comment #6.
>
> The patch itself should qualify as obvious, but as we are in stage4: ok to 
> commit for 4.4?
>   
OK, I convinced myself that the patch should not break anything; it
might cause that some errors or warnings are printed twice,* but I think
that's better than if a warning/error is printed never.

Tobias

* = once by libcpp and once by Fortran; example:  "gfortran -i8
foo.F90"; ".F90" causes CPP preprocessing and the -i8 is afterwards
passed to Fortran; for "foo.f90" or for "-cpp foo.f90 foo.F90" the error
is printed only once; for "foo.f90" by only Fortran and for "-cpp" only
by libcpp.


> 2008-11-29  Daniel Franke  <franke.daniel@gmail.com>
>
> 	PR fortran/37468
> 	* lang-specs.h: Pass on -i* options to f951 to (probably) report
> 	them as unknown.
>
> Regression tested on i686-pc-linux-gnu.
>
> Regards
>
> 	Daniel
>
>
> 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}"
>
>
>   



More information about the Gcc-patches mailing list