Gfortran terminates with an internal compiler error for this test: > cat test.f90 subroutine sub(var,thread_num) ! derived from RTED_OpenMP/FORTRAN/SECTION_B/F_B_7_1_k_Z_s.f90 ! derived from RTED_OpenMP/FORTRAN/SECTION_B/F_B_7_2_k_Z_s.f90 COMPLEX, INTENT(OUT) :: var integer, INTENT(IN) :: thread_num if (thread_num == 0) then !$OMP ATOMIC var = var + 2 end if end subroutine sub > gfortran -fopenmp -c test.f90 test.f90: In function 'sub': test.f90:7: internal compiler error: in gen_lowpart_general, at rtlhooks.c:62 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. > gfortran -v Using built-in specs. Target: x86_64-suse-linux Configured with: ../xt-gcc-4.2.1/configure --prefix=/opt/gcc/4.2.1/snos --disable-nls --libdir=/opt/gcc/4.2.1/snos/lib --enable-languages=c,c++,fortran --with-gxx-include-dir=/opt/gcc/4.2.1/snos/include/g++ --with-slibdir=/opt/gcc/4.2.1/snos/lib --with-sy Thread model: posix gcc version 4.2.1 20070719 (rpm:3) >
This works on the trunk.
(In reply to comment #1) > This works on the trunk. > Not for me. troutmask:sgk[210] gfc4x --version GNU Fortran (GCC) 4.3.0 20070906 (experimental) troutmask:sgk[211] gfc4x -o z -fopenmp l1.f90 l1.f90: In function 'sub': l1.f90:7: internal compiler error: in gen_lowpart_general, at rtlhooks.c:61 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. I have opteron hardware as does I believe Bill.
(In reply to comment #2) > (In reply to comment #1) > > This works on the trunk. > > > > Not for me. I had forgot to add -fopenmp to the options.
Breakpoint 1, gen_lowpart_general (mode=3273328, x=0x31f420) at /Users/apinski/src/local/gcc/gcc/rtlhooks.c:61 61 gcc_assert (MEM_P (x)); (gdb) y Undefined command: "y". Try "help". (gdb) p debug_rtx(x) (concat:SC (reg:SF 65 [ D.1421 ]) (reg:SF 66 [ D.1421+4 ]))
This works for me on the trunk now.
Can't reproduce with either current trunk nor 4.4.4.