This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/20960] New: bus error for return an array
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Apr 2005 23:45:10 -0000
- Subject: [Bug fortran/20960] New: bus error for return an array
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Take the following code:
function f () result (mat)
real, dimension(3) :: mat
mat(1) = 1
return
end
program t
real, dimension(3) :: mat
mat = f ()
end
-----
Run it and you will get a bus error/segfault.
I think this is the same as PR 18197.
This works with ICC 8.1.
It was reduced from Fortran Execution Time Benchmarks at Polyhedron:
http://www.polyhedron.com/compare/linux/f90bench.tgz
--
Summary: bus error for return an array
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 18197
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20960