This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/36773] New: zero-sized arrays with cshift and eoshift
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jul 2008 16:06:30 -0000
- Subject: [Bug libfortran/36773] New: zero-sized arrays with cshift and eoshift
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
$ 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