[Bug fortran/47886] New: ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)
longb at cray dot com
gcc-bugzilla@gcc.gnu.org
Thu Feb 24 21:59:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47886
Summary: ICE: OpenMP !$omp task if(omp_get_num_threads() > 0)
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: longb@cray.com
Test code:
! derived from OpenMP test OMP3f/F03_2_7_1d.F90
program F03_2_7_1d
use omp_lib
implicit none
integer, parameter :: NT = 4
integer :: sum = 0
call omp_set_num_threads(NT);
!$omp parallel
!$omp task if(omp_get_num_threads() > 0)
!$omp atomic
sum = sum + 1
!$omp end task
!$omp end parallel
if (sum /= NT) then
print *, "FAIL - sum == ", sum, " (expected ", NT, ")"
stop 1;
end if
end program F03_2_7_1d
> gfortran -fopenmp test.f90
test.f90: In function 'f03_2_7_1d':
test.f90:11:0: internal compiler error: in gfc_conv_expr_op, at
fortran/trans-expr.c:1368
Please submit a full bug report,
> gfortran -v
Using built-in specs.
COLLECT_GCC=/opt/gcc/4.5.2/bin/../snos/bin/gfortran
COLLECT_LTO_WRAPPER=/opt/gcc/4.5.2/snos/libexec/gcc/x86_64-suse-linux/4.5.2/lto-wrapper
Target: x86_64-suse-linux
Same code fine with ifort:
> ifort -openmp test.f90
> ./a.out
>
More information about the Gcc-bugs
mailing list