When "-pipe" is used for .F90 and .F95 sources this warning is produced: Warning: Reading file '<stdin>' as free form. The reason is the compiler cannot deduce the form from the file name suffix as in this case it's only known to the preprocessor. Here is an obvious patch following the approach used for .F/.fpp/.FPP and .f/.for/.FOR files. 2005-08-22 Maciej W. Rozycki <macro@linux-mips.org> * fortran/lang-specs.h: Pass "-ffree-form" by default for Fortran 90 sources. Tested successfully in a native bootstrap for "i386-linux-gnu" for GCC 4.0.1. Inspection of sources shows it is needed for HEAD as well.
Created attachment 9719 [details] gcc-4.0.1-fortran-form-free.patch
Confirmed.
I'm rediscovering that bug, so I'm assigning this bug to myself in order to not forget it again :) One remark: I don't understand exactly why the second part would be needed: -{"@f95", "%{!E:f951 %i %(cc1_options) %{J*} %{I*}\ +{"@f95", "%{!E:f951 %i %{!ffixed-form:-ffree-form} %(cc1_options) %{J*} %{I*}\ %{!fsyntax-only:%(invoke_as)}}", 0, 0, 0}, as currently, the @f95 sources (files with .f95 and .f90) are compiled correctly.
Subject: Bug 23862 Author: fxcoudert Date: Sat Jun 24 16:06:28 2006 New Revision: 114970 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114970 Log: PR fortran/23862 * lang-specs.h (f95-cpp-input): Pass -ffree-form to f951 unless -ffixed-form is explicitly specified. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/lang-specs.h
Subject: Bug 23862 Author: fxcoudert Date: Sun Jul 2 21:17:05 2006 New Revision: 115134 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115134 Log: PR fortran/28094 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Support cases where there is no integer kind equal to the resulting real kind. * intrinsic.c (add_functions): MODULO is not allowed as an actual argument. * Makefile.am: Add _mod_r10.F90 and _mod_r16.F90. * Makefile.in: Regenerate. * generated/_mod_r10.F90: New file. * generated/_mod_r16.F90: New file. PR fortran/27965 * trans-array.c (gfc_conv_ss_startstride): Correct the runtime conditions for bounds-checking. Check for nonzero stride. Don't check the last dimension of assumed-size arrays. Fix the dimension displayed in the error message. PR fortran/26801 * trans-intrinsic.c (gfc_conv_associated): Use pre and post blocks of the scalarization expression. * gfortran.dg/associated_4.f90: New test. PR fortran/28081 * resolve.c (resolve_substring): Don't issue out-of-bounds error messages when the range has zero size. * gfortran.dg/substr_3.f: New test. * gfortran.dg/equiv_2.f90: Update expected error message. PR fortran/23862 * lang-specs.h (f95-cpp-input): Pass -ffree-form to f951 unless -ffixed-form is explicitly specified. Added: branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/associated_4.f90 - copied unchanged from r114757, trunk/gcc/testsuite/gfortran.dg/associated_4.f90 branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/substr_3.f - copied unchanged from r114972, trunk/gcc/testsuite/gfortran.dg/substr_3.f branches/gcc-4_1-branch/libgfortran/generated/_mod_r10.F90 - copied unchanged from r114961, trunk/libgfortran/generated/_mod_r10.F90 branches/gcc-4_1-branch/libgfortran/generated/_mod_r16.F90 - copied unchanged from r114961, trunk/libgfortran/generated/_mod_r16.F90 Modified: branches/gcc-4_1-branch/gcc/fortran/ChangeLog branches/gcc-4_1-branch/gcc/fortran/intrinsic.c branches/gcc-4_1-branch/gcc/fortran/lang-specs.h branches/gcc-4_1-branch/gcc/fortran/resolve.c branches/gcc-4_1-branch/gcc/fortran/trans-array.c branches/gcc-4_1-branch/gcc/fortran/trans-intrinsic.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/equiv_2.f90 branches/gcc-4_1-branch/libgfortran/ChangeLog branches/gcc-4_1-branch/libgfortran/Makefile.am branches/gcc-4_1-branch/libgfortran/Makefile.in
Fixed.