public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20960] bus error for return an array
[not found] <bug-20960-6528@http.gcc.gnu.org/bugzilla/>
@ 2006-01-05 20:24 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-05 20:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-01-05 20:23 -------
Actually it does not work, though it does compile but I would like to know if
this should compile or just produce an error?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20960
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/20960] bus error for return an array
2005-04-11 23:45 [Bug fortran/20960] New: " pinskia at gcc dot gnu dot org
@ 2005-04-12 0:49 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-12 0:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-12 00:49 -------
Actually this is invalid code as I found out the hard way, XLC has the same issue as gfortran.
Why ICC plays so fast and lose I have no idea, oh well.
The correct way to declare the function and use it is the following (Thanks David E.):
module def
interface f
function f() result(mat)
real, dimension(3,3) :: mat
end function f
end interface
end module
program main
use def
real, dimension(3,3) :: mat
mat = f ()
print *, mat
end program
function f () result(mat)
real, dimension(3,3) :: mat
mat(1,1) = 1
end function f
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20960
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-01-05 20:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-20960-6528@http.gcc.gnu.org/bugzilla/>
2006-01-05 20:24 ` [Bug fortran/20960] bus error for return an array pinskia at gcc dot gnu dot org
2005-04-11 23:45 [Bug fortran/20960] New: " pinskia at gcc dot gnu dot org
2005-04-12 0:49 ` [Bug fortran/20960] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).