This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/79313] associate statement inside openmp loop breaks OMP intrinisics


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

--- Comment #3 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Feb 01, 2017 at 04:37:52AM +0000, kargl at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79313
> 
> --- Comment #2 from kargl at gcc dot gnu.org ---
> Your code looks bogus.  If you add 
> 
>   use omp_lib 
> 
> to the code.  It compiles and works.
> 

An alternative is to add the line

include 'omp_lib.h'

after the 'implicit none' statement in lieu of the module.

A 3rd alternative is change your declaration in the subroutine to

    integer, external :: omp_get_thread_num, omp_get_num_threads

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