$ cat cshift-alloc.f90
program main
  implicit none
  integer, dimension (:,:),allocatable :: a
  integer, dimension (3) :: sh
  integer :: i

  allocate (a(3,3))
  a = reshape((/(i,i=1,9)/),shape(a))
  sh = (/ 2, -1, -2 /)
  write(*,fmt='(10I5)') cshift(a, shift=sh)

end program main
$ gfortran cshift-alloc.f90
$ ./a.out
Segmentation fault
$ nm ./a.out | grep shift
                 U _gfortran_cshift1_4

Same thing for eoshift1 and eoshift3.

-- 
           Summary: eoshift1, eoshift3, cshift1 lack memory allocation
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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

Reply via email to