public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies)
@ 2010-05-01 17:23 kirr at landau dot phys dot spbu dot ru
2010-08-07 18:18 ` [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F mikael at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: kirr at landau dot phys dot spbu dot ru @ 2010-05-01 17:23 UTC (permalink / raw)
To: gcc-bugs
Hello,
Like with gcc and g++, for compiling .F sources with gfortran, I
thankfully use automatic dependencies generator built into gcc's cpp.
E.g. for
$ cat test.F
#include "test.h"
program test
print *,'Hello World!'
print *,ZZZ
end
$ cat test.h
#define ZZZ 'Hello up there qqq!'
gfortran-4.3 correctly generates .d file for make:
$ gfortran-4.3 -Wp,-MD,test.d test.F
$ cat test.d
test.o: test.F test.h
but gfortran-4.4 fails:
$ rm test.d
$ gfortran-4.4 -Wp,-MD,test.d test.F
f951: warning: command line option "-MD" is valid for C/C++/ObjC/ObjC++ but
not for Fortran
$ cat test.d
cat: test.d: No such file or directory
I think gfortran-4.4 behaviour is incorrect, since .F files (contrast
with .f) by definition should be passed through preprocessor, and if so,
why dropping automatic dependencies generation which worked in 4.3?
I guess the regression is somehow related to the fact, that starting from
gcc-4.4, "GNU Fortran now employs libcpp directly instead of
using cc1 as an external preprocessor." [1]
$ gfortran-4.3 -v -Wp,-MD,test.d test.F
Driving: gfortran-4.3 -v -Wp,-MD,test.d test.F -lgfortranbegin -lgfortran
-lm -shared-libgcc
...
gcc version 4.3.4 (Debian 4.3.4-6)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic'
/usr/lib/gcc/i486-linux-gnu/4.3.4/cc1 -E -lang-fortran -traditional-cpp
-D_LANGUAGE_FORTRAN -quiet -v -MD test.d test.F -mtune=generic -o
/tmp/cclR3nYK.f
...
/usr/lib/gcc/i486-linux-gnu/4.3.4/f951 /tmp/cclR3nYK.f -ffixed-form -quiet
-dumpbase test.F -mtune=generic -auxbase test -version -fpreprocessed
-fintrinsic-modules-path /usr/lib/gcc/i486-linux-gnu/4.3.4/finclude -o
/tmp/cc0ZnWFl.s
(compare to)
$ gfortran-4.4 -v -Wp,-MD,test.d test.F
Driving: gfortran-4.4 -v -Wp,-MD,test.d test.F -lgfortranbegin -lgfortran
-lm -shared-libgcc
...
gcc version 4.4.3 20100108 (prerelease) (Debian 4.4.2-9)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=i486'
/usr/lib/gcc/i486-linux-gnu/4.4.3/f951 test.F -ffixed-form -cpp
/tmp/ccE2JRYl.f90 -quiet -v -MD test.d test.F -quiet -dumpbase test.F
-mtune=generic -march=i486 -auxbase test -version -fintrinsic-modules-path
/usr/lib/gcc/i486-linux-gnu/4.4.3/finclude -o /tmp/ccwptNMx.s
f951: warning: command line option "-MD" is valid for C/C++/ObjC/ObjC++ but
not for Fortran
And since -MD was declared to be C/C++/ObjC/ObjC++ only option for ages
(at least since 2003-06-01 d821d2 in gcc.git), now for 4.4. it does not
work. It worked for 4.3 because there `cc1 -E` is explicitly called as
separate step... And for 4.4. calling cc1 explicitly works too
$ /usr/lib/gcc/i486-linux-gnu/4.4.3/cc1 -E -D_LANGUAGE_FORTRAN -quiet -v
-MD test.d test.F -o test.f
$ cat test.d
test.o: test.F test.h
but is of no help because cc1 is internal.
--------
Clearly this is functional regression to me. If possible please fix.
Thanks beforehand,
Kirill
P.S. this is somehow related to bug #31588
[1] http://gcc.gnu.org/gcc-4.4/changes.html
[2]
http://git.infradead.org/gcc.git/commit/d821d2e95e00a93f2edb5f6d3decc9c83ceb9c61
$ gfortran-4.4 -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.2-9'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--enable-multiarch --enable-linker-build-id --with-system-zlib
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-targets=all --with-arch-32=i486 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.4.3 20100108 (prerelease) (Debian 4.4.2-9)
--
Summary: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 ->
4.4 regression, needed for auto-dependencies)
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kirr at landau dot phys dot spbu dot ru
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F
2010-05-01 17:23 [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) kirr at landau dot phys dot spbu dot ru
@ 2010-08-07 18:18 ` mikael at gcc dot gnu dot org
2010-08-07 18:22 ` kirr at landau dot phys dot spbu dot ru
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu dot org @ 2010-08-07 18:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from mikael at gcc dot gnu dot org 2010-08-07 18:18 -------
(In reply to comment #14)
> Thanks again. But why 4.3? It's 4.4 and 4.5 which need fixing. 4.3 is
> ok. Am I misunderstanding something?
Sorry, my mistake.
Changed accordingly (and according to the fix committed by Jerry).
--
mikael at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.3/4.4 regression] |[4.4 regression] gfortran
|gfortran does not support - |does not support -Wp, -MD
|Wp, -MD for *.F |for *.F
Target Milestone|4.3.6 |4.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F
2010-05-01 17:23 [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) kirr at landau dot phys dot spbu dot ru
2010-08-07 18:18 ` [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F mikael at gcc dot gnu dot org
@ 2010-08-07 18:22 ` kirr at landau dot phys dot spbu dot ru
2010-08-07 18:26 ` jvdelisle at verizon dot net
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: kirr at landau dot phys dot spbu dot ru @ 2010-08-07 18:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from kirr at landau dot phys dot spbu dot ru 2010-08-07 18:21 -------
Subject: Re: [4.3/4.4 regression] gfortran does not support -Wp, -MD for *.F
On Sat, Aug 07, 2010 at 04:52:14PM -0000, jvdelisle at gcc dot gnu dot org
wrote:
> ------- Comment #16 from jvdelisle at gcc dot gnu dot org 2010-08-07 16:52 -------
> Subject: Bug 43954
>
> Author: jvdelisle
> Date: Sat Aug 7 16:51:55 2010
> New Revision: 162980
>
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162980
> Log:
> 2010-08-07 Daniel Franke <franke.daniel@gmail.com>
>
> 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
>
> PR fortran/31588
> PR fortran/43954
> Backport from mainline:
...
Thanks a lot!
Only if you could please also apply the -4.4 version. *Please*
The rationale for this is that 4.4 will be the default compiler in the
next upcoming Debian stable.
Thanks,
Kirill
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F
2010-05-01 17:23 [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) kirr at landau dot phys dot spbu dot ru
2010-08-07 18:18 ` [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F mikael at gcc dot gnu dot org
2010-08-07 18:22 ` kirr at landau dot phys dot spbu dot ru
@ 2010-08-07 18:26 ` jvdelisle at verizon dot net
2010-08-08 1:59 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at verizon dot net @ 2010-08-07 18:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from jvdelisle at verizon dot net 2010-08-07 18:25 -------
Subject: Re: [4.4 regression] gfortran does not support
-Wp, -MD for *.F
> Thanks a lot!
>
> Only if you could please also apply the -4.4 version. *Please*
>
> The rationale for this is that 4.4 will be the default compiler in the
> next upcoming Debian stable.
Will do.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F
2010-05-01 17:23 [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) kirr at landau dot phys dot spbu dot ru
` (2 preceding siblings ...)
2010-08-07 18:26 ` jvdelisle at verizon dot net
@ 2010-08-08 1:59 ` jvdelisle at gcc dot gnu dot org
2010-08-08 5:29 ` jvdelisle at gcc dot gnu dot org
2010-08-08 9:20 ` kirr at landau dot phys dot spbu dot ru
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-08-08 1:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from jvdelisle at gcc dot gnu dot org 2010-08-08 01:59 -------
Subject: Bug 43954
Author: jvdelisle
Date: Sun Aug 8 01:59:15 2010
New Revision: 162990
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162990
Log:
2010-08-07 Daniel Franke <franke.daniel@gmail.com>
PR fortran/31588
PR fortran/43954
Backport from mainline:
* gfortranspec.c (lang_specific_driver): Removed deprecation
warning for -M.
* lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
* lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
* cpp.h (gfc_cpp_makedep): New.
(gfc_cpp_add_dep): New.
(gfc_cpp_add_target): New.
* cpp.c (gfc_cpp_option): Add deps* members.
(gfc_cpp_makedep): New.
(gfc_cpp_add_dep): New.
(gfc_cpp_add_target): New.
(gfc_cpp_init_options): Initialize new options.
(gfc_cpp_handle_option): Handle new options.
(gfc_cpp_post_options): Map new options to libcpp-options.
(gfc_cpp_init): Handle deferred -MQ and -MT options.
(gfc_cpp_done): If requested, write dependencies to file.
* module.c (gfc_dump_module): Add a module filename as target.
* scanner.c (open_included_file): New parameter system; add the
included file as dependency.
(gfc_open_included_file): Add the included file as dependency.
(gfc_open_intrinsic_module): Likewise.
* invoke.texi: Removed deprecation warning for -M.
* gfortran.texi: Removed Makefile-dependencies project.
Modified:
branches/gcc-4_4-branch/gcc/fortran/ChangeLog
branches/gcc-4_4-branch/gcc/fortran/cpp.c
branches/gcc-4_4-branch/gcc/fortran/cpp.h
branches/gcc-4_4-branch/gcc/fortran/gfortran.texi
branches/gcc-4_4-branch/gcc/fortran/gfortranspec.c
branches/gcc-4_4-branch/gcc/fortran/invoke.texi
branches/gcc-4_4-branch/gcc/fortran/lang-specs.h
branches/gcc-4_4-branch/gcc/fortran/lang.opt
branches/gcc-4_4-branch/gcc/fortran/module.c
branches/gcc-4_4-branch/gcc/fortran/scanner.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F
2010-05-01 17:23 [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) kirr at landau dot phys dot spbu dot ru
` (3 preceding siblings ...)
2010-08-08 1:59 ` jvdelisle at gcc dot gnu dot org
@ 2010-08-08 5:29 ` jvdelisle at gcc dot gnu dot org
2010-08-08 9:20 ` kirr at landau dot phys dot spbu dot ru
5 siblings, 0 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-08-08 5:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from jvdelisle at gcc dot gnu dot org 2010-08-08 05:29 -------
Closing
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F
2010-05-01 17:23 [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) kirr at landau dot phys dot spbu dot ru
` (4 preceding siblings ...)
2010-08-08 5:29 ` jvdelisle at gcc dot gnu dot org
@ 2010-08-08 9:20 ` kirr at landau dot phys dot spbu dot ru
5 siblings, 0 replies; 7+ messages in thread
From: kirr at landau dot phys dot spbu dot ru @ 2010-08-08 9:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #22 from kirr at landau dot phys dot spbu dot ru 2010-08-08 09:20 -------
Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43954
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-02-16 13:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-43954-4@http.gcc.gnu.org/bugzilla/>
2014-02-16 13:14 ` [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F jackie.rosen at hushmail dot com
2010-05-01 17:23 [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) kirr at landau dot phys dot spbu dot ru
2010-08-07 18:18 ` [Bug fortran/43954] [4.4 regression] gfortran does not support -Wp, -MD for *.F mikael at gcc dot gnu dot org
2010-08-07 18:22 ` kirr at landau dot phys dot spbu dot ru
2010-08-07 18:26 ` jvdelisle at verizon dot net
2010-08-08 1:59 ` jvdelisle at gcc dot gnu dot org
2010-08-08 5:29 ` jvdelisle at gcc dot gnu dot org
2010-08-08 9:20 ` kirr at landau dot phys dot spbu dot ru
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).