This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] Support Fortran OpenMP conditional inclusion


On Tue, Sep 19, 2006 at 05:38:25AM -0400, Jakub Jelinek wrote:
> 
> Although the OpenMP 2.5 standard is quite unclear about this (it
> only talks about conditional initial and continuation lines, while
> include lines are separate category in the Fortran standard), at
> least Intel ifort supports it and it doesn't sound like a bad thing.
> 
> BTW, ifort for fixed form requires at least 6 spaces before include
> (and similarly for !$ at least 4 spaces between include and !$), so
>       program
>   include 'foo.inc'
>       end
> fixed form emits diagnostics (similarly g77), while gfortran accepts it.
> J3/97-007R2, 3.4 wording suggests that gfortran is right, is that
> something that should be differentiated between -std=f77 and -std=f95?
> 
> 2006-09-19  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR fortran/29097
> 	* scanner.c (include_line): Handle conditional include.
> 
> 	* testsuite/libgomp.fortran/condinc1.f: New test.
> 	* testsuite/libgomp.fortran/condinc2.f: New test.
> 	* testsuite/libgomp.fortran/condinc3.f90: New test.
> 	* testsuite/libgomp.fortran/condinc4.f90: New test.
> 	* testsuite/libgomp.fortran/condinc1.inc: New file.
> 

Jakub,

gfortran doesn't have a -std=f77 flag.  I don't think we need
to differentiate between -std=gnu and -std=f95.  In reading 
3.4, I suspect gfortran and this feature fall into a gray 
area where almost any behavior is conforming.

I've read your patch, but not tested it.  I think it is OK
to apply to trunk.  I don't recall if it is applicable to
4.1 branch.

-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]