From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8524 invoked by alias); 17 Jan 2007 18:42:07 -0000 Received: (qmail 8506 invoked by uid 22791); 17 Jan 2007 18:42:05 -0000 X-Spam-Check-By: sourceware.org Received: from zs04.physik.fu-berlin.de (HELO zs04.physik.fu-berlin.de) (160.45.35.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 17 Jan 2007 18:41:59 +0000 Received: from ith.physik.fu-berlin.de ([160.45.32.115] helo=[127.0.0.1]) by zs04.physik.fu-berlin.de with esmtp (Exim 4.63) (envelope-from ) id 1H7FjN-0007Id-Kh; Wed, 17 Jan 2007 19:41:56 +0100 Message-ID: <45AE6DF1.8020503@net-b.de> Date: Wed, 17 Jan 2007 18:42:00 -0000 From: Tobias Burnus User-Agent: Thunderbird 1.5.0.9 (X11/20060911) MIME-Version: 1.0 CC: "'fortran@gcc.gnu.org'" , gcc-patches Subject: Re: [patch, fortran] Support .F03 and .f03 file extensions References: <459F7DC0.9010409@net-b.de> <45AE67D0.2000604@net-b.de> In-Reply-To: <45AE67D0.2000604@net-b.de> Content-Type: multipart/mixed; boundary="------------000701050008070400030703" X-Scanned: No viruses found. Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-01/txt/msg01448.txt.bz2 This is a multi-part message in MIME format. --------------000701050008070400030703 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Content-length: 3108 As Chris wants to use the .f03 extension in the test suite (see his patch for the fortran-experiments branch), I decided to do it already on the trunk and for the complete test suite. Are both patches ok for the trunk? Tobias Tobias Burnus wrote: >> :ADDPATCH fortran: >> >> Support the .f03 and .F03 file extensions. >> >> Ok for the trunk? >> >> Bootstrapped, tested and regression tested on x86_64-unknown-linux-gnu >> >> >> Tobias >> >> >> 2007-01-06 Tobias Burnus >> >> * lang-specs.h: Add support for .f03 and .F03 extensions. >> * gfortran.texi: Document .f03 extension. >> * options.c (form_from_filename): Recognize .f03. >> >> ------------------------------------------------------------------------ >> >> Index: gcc/fortran/gfortran.texi >> =================================================================== >> --- gcc/fortran/gfortran.texi (Revision 120520) >> +++ gcc/fortran/gfortran.texi (Arbeitskopie) >> @@ -367,8 +367,8 @@ >> Fortran) for each file in the source code, and then calls the assembler >> and linker as appropriate to produce the compiled output. In a copy of >> GCC which has been compiled with Fortran language support enabled, >> -@command{gcc} will recognize files with @file{.f}, @file{.f90}, and >> -@file{.f95} extensions as Fortran source code, and compile it >> +@command{gcc} will recognize files with @file{.f}, @file{.f90}, @file{.f95}, >> +and @file{.f03} extensions as Fortran source code, and compile it >> accordingly. A @command{gfortran} driver program is also provided, >> which is identical to @command{gcc} except that it automatically links >> the Fortran runtime libraries into the compiled program. >> Index: gcc/fortran/options.c >> =================================================================== >> --- gcc/fortran/options.c (Revision 120520) >> +++ gcc/fortran/options.c (Arbeitskopie) >> @@ -137,6 +138,9 @@ >> ".f95", FORM_FREE} >> , >> { >> + ".f03", FORM_FREE} >> + , >> + { >> ".f", FORM_FIXED} >> , >> { >> Index: gcc/fortran/lang-specs.h >> =================================================================== >> --- gcc/fortran/lang-specs.h (Revision 120520) >> +++ gcc/fortran/lang-specs.h (Arbeitskopie) >> @@ -18,6 +18,7 @@ >> -fpreprocessed %{!nostdinc:-fintrinsic-modules-path finclude%s} %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, >> {".F90", "@f95-cpp-input", 0, 0, 0}, >> {".F95", "@f95-cpp-input", 0, 0, 0}, >> +{".F03", "@f95-cpp-input", 0, 0, 0}, >> {"@f95-cpp-input", >> "cc1 -E -lang-fortran -traditional-cpp -D_LANGUAGE_FORTRAN %(cpp_options) \ >> %{E|M|MM:%(cpp_debug_options)}\ >> @@ -26,6 +27,7 @@ >> -fpreprocessed %{!nostdinc:-fintrinsic-modules-path finclude%s} %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0}, >> {".f90", "@f95", 0, 0, 0}, >> {".f95", "@f95", 0, 0, 0}, >> +{".f03", "@f95", 0, 0, 0}, >> {"@f95", "%{!E:f951 %i %(cc1_options) %{J*} %{I*}\ >> %{!nostdinc:-fintrinsic-modules-path finclude%s} %{!fsyntax-only:%(invoke_as)}}", 0, 0, 0}, >> {".f", "@f77", 0, 0, 0}, >> >> --------------000701050008070400030703 Content-Type: text/x-patch; name="f03-testsuite.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="f03-testsuite.diff" Content-length: 2892 2007-01-17 Tobias Burnus * gfortran.dg/gomp/gomp.exp: Support .f03 extension. * gfortran.dg/vect/vect.exp: Ditto. * gfortran.dg/dg.exp: Ditto. * gfortran.fortran-torture/execute/execute.exp: Ditto. * gfortran.fortran-torture/compile/compile.exp: Ditto. Index: gcc/testsuite/gfortran.dg/gomp/gomp.exp =================================================================== --- gcc/testsuite/gfortran.dg/gomp/gomp.exp (revision 120854) +++ gcc/testsuite/gfortran.dg/gomp/gomp.exp (working copy) @@ -12,7 +12,7 @@ # Main loop. gfortran-dg-runtest [lsort \ - [find $srcdir/$subdir *.\[fF\]{,90,95} ] ] " -fopenmp" + [find $srcdir/$subdir *.\[fF\]{,90,95,03} ] ] " -fopenmp" # All done. dg-finish Index: gcc/testsuite/gfortran.dg/vect/vect.exp =================================================================== --- gcc/testsuite/gfortran.dg/vect/vect.exp (revision 120854) +++ gcc/testsuite/gfortran.dg/vect/vect.exp (working copy) @@ -90,7 +90,7 @@ dg-init # Main loop. -gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95} ]] $DEFAULT_VECTCFLAGS +gfortran-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03} ]] $DEFAULT_VECTCFLAGS # Clean up. set dg-do-what-default ${save-dg-do-what-default} Index: gcc/testsuite/gfortran.dg/dg.exp =================================================================== --- gcc/testsuite/gfortran.dg/dg.exp (revision 120854) +++ gcc/testsuite/gfortran.dg/dg.exp (working copy) @@ -30,7 +30,7 @@ # Main loop. gfortran-dg-runtest [lsort \ - [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95} ] ] $DEFAULT_FFLAGS + [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03} ] ] $DEFAULT_FFLAGS gfortran-dg-runtest [lsort \ [glob -nocomplain $srcdir/$subdir/g77/*.\[fF\] ] ] $DEFAULT_FFLAGS Index: gcc/testsuite/gfortran.fortran-torture/execute/execute.exp =================================================================== --- gcc/testsuite/gfortran.fortran-torture/execute/execute.exp (revision 120854) +++ gcc/testsuite/gfortran.fortran-torture/execute/execute.exp (working copy) @@ -57,3 +57,9 @@ fortran-torture-execute $testcase } +foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f03]] { + if ![runtest_file_p $runtests $testcase] then { + continue + } + fortran-torture-execute $testcase +} Index: gcc/testsuite/gfortran.fortran-torture/compile/compile.exp =================================================================== --- gcc/testsuite/gfortran.fortran-torture/compile/compile.exp (revision 120854) +++ gcc/testsuite/gfortran.fortran-torture/compile/compile.exp (working copy) @@ -53,3 +53,9 @@ fortran-torture $testcase } +foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f95]] { + if ![runtest_file_p $runtests $testcase] then { + continue + } + fortran-torture $testcase +} --------------000701050008070400030703--