!
! Un-comment the DO and ENDDO and the compiled program
! hangs after the first output line.
!
! Compiled with: gfortran junk.f90
! where: gfortran --version gives
!   GNU Fortran 95 (GCC 4.0.2 20051125 (Red Hat 4.0.2-8))
! Running on Fedora Core 4, Opteron
!
! E. Kornkven, [EMAIL PROTECTED]
!
      program junk
      implicit none
      integer n, i
      parameter (n = 1000000)
      double precision a(n), b(n), c(n), summation

      print*, '                perform some computation ... '
      summation = 0.0
      do i = 1, 1
         a = (/ (i, i = 1, n) /)
         a = sqrt(a)
         b = 1.0 / a
         c = b - a
         summation = SUM(a)
      enddo

      a(n/2) = 13.0
      print*, "Is the middle value 13.0? ", a(n/2-1), a(n/2), a(n/2+1)
      print*, "Summation = ", summation

      end program junk


-- 
           Summary: Code inside loop hangs; outside loop runs normally; runs
                    OK on other compilers
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kornkven at arsc dot edu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28914

Reply via email to