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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |error-recovery,
                   |                            |ice-on-invalid-code
   Last reconfirmed|                            |2012-08-13
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |janus at gcc dot gnu.org
     Ever Confirmed|0                           |1
            Summary|f951: internal compiler     |[OOP] ICE (segfault) in
                   |error: Segmentation fault   |gfc_type_compatible for
                   |(trying to compile          |invalid BT_CLASS
                   |errorneous code)            |

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-08-13 
15:35:11 UTC ---
Segfaults in

4837    gfc_type_compatible (gfc_typespec *ts1, gfc_typespec *ts2)
4838    {
4839      bool is_class1 = (ts1->type == BT_CLASS);
4840      bool is_class2 = (ts2->type == BT_CLASS);
...
4853      else if (is_class1 && is_class2)
4854        return gfc_type_is_extension_of
(ts1->u.derived->components->ts.u.derived,
4855                                        
ts2->u.derived->components->ts.u.derived);

The problem is that ts2->u.derived->components == NULL.

Reply via email to