This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/41585] [OOP] Reject CLASS(T) as component of "TYPE :: T"
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Oct 2009 21:50:04 -0000
- Subject: [Bug fortran/41585] [OOP] Reject CLASS(T) as component of "TYPE :: T"
- References: <bug-41585-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from janus at gcc dot gnu dot org 2009-10-07 21:50 -------
This can be fixed by:
Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c (Revision 152525)
+++ gcc/fortran/decl.c (Arbeitskopie)
@@ -1465,7 +1465,7 @@ build_struct (const char *name, gfc_charlen *cl, g
/* If the current symbol is of the same derived type that we're
constructing, it must have the pointer attribute. */
- if (current_ts.type == BT_DERIVED
+ if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS)
&& current_ts.u.derived == gfc_current_block ()
&& current_attr.pointer == 0)
{
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-10-07 21:50:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41585