From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27547 invoked by alias); 1 May 2010 17:23:54 -0000 Received: (qmail 26547 invoked by uid 48); 1 May 2010 17:23:40 -0000 Date: Sat, 01 May 2010 17:23:00 -0000 Subject: [Bug fortran/43954] New: gfortran-4.4 does not support -Wp, -MD for *.F (4.3 -> 4.4 regression, needed for auto-dependencies) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kirr at landau dot phys dot spbu dot ru" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg00044.txt.bz2 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