This is the mail archive of the
mailing list for the GCC project.
Re: [gomp] Support Fortran OpenMP conditional inclusion
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org
- Date: Mon, 25 Sep 2006 10:29:20 -0700
- Subject: Re: [gomp] Support Fortran OpenMP conditional inclusion
- References: <20060919093824.GE12531@devserv.devel.redhat.com>
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
> include 'foo.inc'
> 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 <email@example.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.
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