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



janus at gcc dot gnu.org changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|NEW                         |ASSIGNED

         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org

                   |gnu.org                     |



--- Comment #5 from janus at gcc dot gnu.org 2013-01-15 21:10:26 UTC ---

The following patch fixes the ICE in comment 0:





Index: gcc/fortran/class.c

===================================================================

--- gcc/fortran/class.c    (revision 195125)

+++ gcc/fortran/class.c    (working copy)

@@ -2707,15 +2707,17 @@ find_typebound_proc_uop (gfc_symbol* derived, gfc_

   gfc_symtree* res;

   gfc_symtree* root;



-  /* Set correct symbol-root.  */

-  gcc_assert (derived->f2k_derived);

-  root = (uop ? derived->f2k_derived->tb_uop_root

-          : derived->f2k_derived->tb_sym_root);

-

   /* Set default to failure.  */

   if (t)

     *t = FAILURE;



+  if (derived->f2k_derived)

+    /* Set correct symbol-root.  */

+    root = (uop ? derived->f2k_derived->tb_uop_root

+        : derived->f2k_derived->tb_sym_root);

+  else

+    return NULL;

+

   /* Try to find it in the current type's namespace.  */

   res = gfc_find_symtree (root, name);

   if (res && res->n.tb && !res->n.tb->error)

Reply via email to