[Bug fortran/56284] [OOP] ICE with alternate return in type-bound procedure

janus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 11 12:17:00 GMT 2013


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code

--- Comment #4 from janus at gcc dot gnu.org 2013-02-11 12:17:34 UTC ---
The following fixes the ICE:

Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c    (revision 195915)
+++ gcc/fortran/interface.c    (working copy)
@@ -1023,6 +1023,9 @@ static gfc_try
 check_dummy_characteristics (gfc_symbol *s1, gfc_symbol *s2,
                  bool type_must_agree, char *errmsg, int err_len)
 {
+  if (s1 == NULL || s2 == NULL)
+    return s1 == s2 ? SUCCESS : FAILURE;
+
   /* Check type and rank.  */
   if (type_must_agree && !compare_type_rank (s2, s1))
     {



More information about the Gcc-bugs mailing list