This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/41608] ICE with CLASS and invalid code



------- Comment #1 from janus at gcc dot gnu dot org  2009-10-07 21:58 -------
The fix:

Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c  (Revision 152525)
+++ gcc/fortran/decl.c  (Arbeitskopie)
@@ -3751,7 +3751,8 @@ gfc_match_data_decl (void)
   if (m != MATCH_YES)
     return m;

-  if (current_ts.type == BT_DERIVED && gfc_current_state () != COMP_DERIVED)
+  if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS)
+      && gfc_current_state () != COMP_DERIVED)
     {
       sym = gfc_use_derived (current_ts.u.derived);

@@ -3771,7 +3772,8 @@ gfc_match_data_decl (void)
       goto cleanup;
     }

-  if (current_ts.type == BT_DERIVED && current_ts.u.derived->components ==
NULL
+  if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS)
+      && current_ts.u.derived->components == NULL
       && !current_ts.u.derived->attr.zero_comp)
     {


-- 

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:58:53
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41608


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]