https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79154

--- Comment #2 from Chinoune <chinoune.mehdi at hotmail dot com> ---
(In reply to kargl from comment #1)
> (In reply to Chinoune from comment #0)
> > Created attachment 40550 [details]
> > the fortran program
> > 
> > I tried to build the program (see attachment) with gfortran (5.4.0
> > linux,cygwin 6.2.0,6.3.0 mingw 6.2.0 linux ...)
> > it gave me this error:
> > test_simd.f90:6:6:
> > 
> >  !$omp declare simd(add)
> >       1
> > Error: OpenMP directives at (1) may not appear in PURE or ELEMENTAL
> > procedures
> 
> AFAIK, GCC support OpenMP 4.0.  On p. 26 of OpenMP 4.0 Standard, one
> finds
> 
>   Restrictions
> 
>   The following restriction applies to all OpenMP directives:
>   · OpenMP directives may not appear in PURE or ELEMENTAL procedures.
> 
> so you get the above error message.  I'll note that OpenMP 4.5 Standard
> states
> Restrictions
> 
> The following restriction applies to all OpenMP directives:
> 
>   Restrictions
> 
>   · OpenMP directives, except SIMD and declare target directives,
>     may not appear in pure
>     procedures.
> 
> I'll further note that the GCC wiki page for OpenMP sugeests that
> no one is actively working on $.5 support.

gcc support full openmp 4.5 for c/c++ (see
https://gcc.gnu.org/gcc-6/changes.html) and partially for fortran, so the omp
simd declare must be accepted.

Reply via email to