gomp - equivalence for threadprivate data
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Jan 26 22:22:00 GMT 2009
On Mon, Jan 26, 2009 at 09:02:54PM +0100, Tobias Burnus wrote:
> Steve Kargl wrote:
> > I doubt that this misfeature has ever been allowed by any
> > revision of the OpenMPi Standard, so -fopen-std=legacy make
> > no sense. Perhaps, -fopenmp-lemming or -fgnu-openmp. The
> > default behavior should be an error.
>
> Well, legacy is meant for legacy code: I think (almost?) no code which
> is only allowed by -std=legacy was ever legal Fortran
> 66/77/90/95/2003/2008, but still it is supported.
-std=legacy allows backwards compatibility with g77, which
unfortunately acceptable too much questionable garbage.
Use -std=legacy for tab in an OpenMP directive. Don't
invent a new option -fopenmp-std=legacy, which only
has one value.
> Actually things like "<tab>" (esp. in fixed-form source code) were
> never allowed and still gfortran accepts then by default (-std=gnu)
> and without warning.
Go find my original patches. Too many people whined when I made
it an error by default. After several months and several patches
sitting the mailing list, I relented and made the error into a warning
by default. People stil complained. Finally, the logic was inverted
to have the warning off by default.
http://gcc.gnu.org/ml/fortran/2006-03/msg00226.html
http://gcc.gnu.org/ml/fortran/2006-03/msg00162.html
I still believe this should be a fatal error.
> In that regard I don't see a reason why a widely supported non-standard
> OpenMP construct, which is used in real-world programs cannot be
> supported (be it with a warning, be it with a special flag).
>
> >> Regarding the legacy checking: Gfortran also supports the <tab>
> >> character in $omp! contrary to the standard but in line with the other
> >> compilers. One could add an error/warning there, but again one misses a
> >> -fopenmp-std= option.
> >>
> > tab is perfectly fine within OpenMP 3.0.
> >
>
> See http://gcc.gnu.org/ml/fortran/2008-05/msg00326.html and in the spec:
> (2.1.1) "Initial directive lines must have a space or a zero in column 6"
>
> The tab is accepted without any warning or error in gfortran, which I
> think it OK, but one could argue otherwise.*
>
> Tobias
>
> * Actually, I mentioned that both when the patch went into the GOMP3
> branch and before its merge to the trunkj,
> http://gcc.gnu.org/ml/fortran/2008-06/msg00035.html, but no one thought
> that a warning/error was really required. [I'm happy with that
> change/the status quo (as I would be if a warning were printed).]
At the very least a warning should be issued. Silently, accepting
code that violates the Standards led to all the garbage under
-std=legacy.
--
Steve
More information about the Fortran
mailing list