This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33334] User-defined type as function result: use-assocciated not accepted
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Sep 2007 08:09:54 -0000
- Subject: [Bug fortran/33334] User-defined type as function result: use-assocciated not accepted
- References: <bug-33334-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2007-09-08 08:09 -------
This probably needs the same technique as PR31229 / PR31154.
The following program is valid, but rejected by gfortran (also if one does not
rename the symbol):
func%i = 5
1
Error: Derived type 'z' at (1) is being used before it is defined
a.f90:7.21:
type(z) function func()
1
Error: The derived type 'func' at (1) is of type 'z', which has not been
defined
module x
type t
integer :: i
end type t
end module x
type(z) function func()
use x, only: z=>t
func%i = 5
end function func
This program is accepted by NAG f95, g95, ifort, openf95 and sunf95.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |32834
nThis| |
Keywords| |rejects-valid
Summary|User-defined type as |User-defined type as
|function result in an |function result: use-
|interface: Accepts invalid |assocciated not accepted
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33334