This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

bug fc004



-- Walt Brainerd +1-877-355-6640 (voice & fax) The Fortran Company +1-520-760-1397 (outside USA) 6025 N. Wilmot Road walt@fortran.com Tucson, AZ 85750 USA http://www.fortran.com

module  c1_MOD

! Submitted by Walt Brainerd, The Fortran Company
! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental))
! Windows XP

! fc004.f95: In function 'to_sub':
! fc004.f95:53: internal compiler error: Segmentation fault

  integer, parameter :: U_1D = 10
  integer, parameter :: U_2D = 23
  integer, parameter :: L_1D = -1
  integer, parameter :: L_2D = -2

  contains

  function zero()
  character :: zero
  zero = " "
  end function zero

end module c1_MOD

program fc004

  use c1_MOD

  interface
    subroutine  TO_SUB(I)
      use  c1_MOD
      character, pointer :: I(:,:)
    end subroutine
  end interface

  character (1), pointer :: A(:,:)

  allocate (A(L_1D:U_1D,L_2D:U_2D))

  call  TO_SUB(A)

end program fc004

subroutine  TO_SUB(I)

  use  c1_MOD

  character (1), pointer ::  I(:,:)

  integer  Q1, Q2
  character (1)  S

  S = ZERO()
  LOOP : do Q1 = lbound(I,1), ubound(I,1)
    do Q2 = lbound(I,2), ubound(I,2)
    enddo
  enddo LOOP

end subroutine TO_SUB

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]