$ cat cshift.f90
program main
  real, dimension(1,0) :: a,b
  print *,size(a),size(b)
  b = cshift(a,1)
end program main
$ gfortran cshift.f90
$ ./a.out
           0           0
Segmentation fault (core dumped)
$ cat eoshift.f90
program main
  real, dimension(1,0) :: a,b
  print *,size(a),size(b)
  b = eoshift(a,1)
end program main
$ gfortran eoshift.f90
$ ./a.out
           0           0
Segmentation fault (core dumped)
$


-- 
           Summary: zero-sized arrays with cshift and eoshift
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org


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

Reply via email to