Created attachment 29692 [details] Test source file to reproduce the error Attempting to compile the attached file with gfortran -fopenmp -c openmp_ice.f90 ...gives the following result: openmp_ice.f90: In function ‘sub’: openmp_ice.f90:8:0: internal compiler error: in omp_add_variable, at gimplify.c:5894 associate(x_a => x) ^ openmp_ice.f90:8:0: internal compiler error: Abort trap: 6 gfortran.exec: internal compiler error: Abort trap: 6 (program f951) /Applications/madsdk/bin/gfortran: line 7: 16428 Abort trap: 6 /Applications/madsdk/bin/gfortran.exec -fopenmp -c openmp_ice.f90 This may be related to PR 56062. My system: Using built-in specs. COLLECT_GCC=/Applications/madsdk/bin/gfortran.exec COLLECT_LTO_WRAPPER=/Applications/madsdk/libexec/gcc/x86_64-apple-darwin11.4.2/4.8.0/lto-wrapper Target: x86_64-apple-darwin11.4.2 Configured with: ./configure CC='gcc -D_FORTIFY_SOURCE=0' --build=x86_64-apple-darwin11.4.2 --prefix=/Applications/madsdk --with-gmp=/Applications/madsdk --with-mpfr=/Applications/madsdk --with-mpc=/Applications/madsdk --enable-languages=c,c++,fortran --disable-multilib Thread model: posix gcc version 4.8.0 20130307 (experimental) (GCC)
(In reply to comment #0) > Created attachment 29692 [details] > Test source file to reproduce the error > > Attempting to compile the attached file with > > gfortran -fopenmp -c openmp_ice.f90 The file in the attachment is called 'test_h5_attr.f90' and I don't find any ASSOCIATE construct in there. Wrong file attached?
(In reply to comment #1) > (In reply to comment #0) > > Created attachment 29692 [details] > > Test source file to reproduce the error > > > > Attempting to compile the attached file with > > > > gfortran -fopenmp -c openmp_ice.f90 > > The file in the attachment is called 'test_h5_attr.f90' and I don't find any > ASSOCIATE construct in there. Wrong file attached? (In reply to comment #1) > (In reply to comment #0) > > Created attachment 29692 [details] > > Test source file to reproduce the error > > > > Attempting to compile the attached file with > > > > gfortran -fopenmp -c openmp_ice.f90 > > The file in the attachment is called 'test_h5_attr.f90' and I don't find any > ASSOCIATE construct in there. Wrong file attached? Ooops -- wrong test case. Here it is: subroutine sub (x) implicit none real, intent(in) :: x !$omp single associate(x_a => x) end associate !$omp end single end subroutine sub
Note: OpenMP 3.1 does not handle any of Fortran 2003. In the current draft of OpenMP 4.0 (RC2), cf. http://openmp.org/wp/openmp-specifications/, many F03 features are still not supported. However, ASSOCIATE actually seems to be supported.
The final specification of OpenMP 4.0 has been published by now and apparently supports the ASSOCIATE construct.
The test in comment 2 compiles with r206348. I doubt the fix (OpenMP 4.0?) will be back ported to 4.8. Closing as FIXED?
>The test in comment 2 compiles with r206348. I doubt the fix (OpenMP 4.0?) > will be back ported to 4.8. Closing as FIXED? The original test also compiles and runs with 4.9.0 and trunk (4.10, r210000). No answer for more than three months. Closing as FIXED.