This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/79313] associate statement inside openmp loop breaks OMP intrinisics
- From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 01 Feb 2017 05:12:35 +0000
- Subject: [Bug fortran/79313] associate statement inside openmp loop breaks OMP intrinisics
- Auto-submitted: auto-generated
- References: <bug-79313-4@http.gcc.gnu.org/bugzilla/>
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