Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/9a7daa8d75084b6b/
The program looks valid. It crashes here at run time with -m32, but not with
-m64; with "y(j) = 0.0_dp" commented out it does not crash at all, here.
program sums
implicit none
integer, parameter :: sp = kind(1.0)
integer, parameter :: dp = selected_real_kind(2*precision(1.0_sp))
integer, parameter :: num_steps = 2000000
real :: t1, t2
integer :: i, j
real(kind=dp), dimension(0:num_steps-1) :: y
call cpu_time(t1)
y(j) = 0.0_dp
!$omp parallel do private(i)
do j=0,num_steps-1
do i=0,49
y(j) = y(j) + 0.7_dp**i
end do
end do
!$omp end parallel do
call cpu_time(t2)
print *, "y(end) = ", y(num_steps-1)
print *, "Reached result in ", t2-t1, " seconds processor time."
end program sums
--
Summary: OpenMP: Crashes with valid code.
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: openmp
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34044