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



--- Comment #10 from janus at gcc dot gnu.org 2013-01-08 09:47:17 UTC ---

For comment #8, resolve_typebound_intrinsic_op is called twice: Once for the

base type 'nc', and once for the extended type 'ncb'.



A crude way to avoid this is the following:



Index: gcc/fortran/resolve.c

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

--- gcc/fortran/resolve.c    (revision 194927)

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

@@ -12315,15 +12315,10 @@ static gfc_try

 resolve_typebound_procedures (gfc_symbol* derived)

 {

   int op;

-  gfc_symbol* super_type;



   if (!derived->f2k_derived || !derived->f2k_derived->tb_sym_root)

     return SUCCESS;



-  super_type = gfc_get_derived_super_type (derived);

-  if (super_type)

-    resolve_typebound_procedures (super_type);

-

   resolve_bindings_derived = derived;

   resolve_bindings_result = SUCCESS;





This fails on:



FAIL: gfortran.dg/abstract_type_6.f03  -O  (test for excess errors)

FAIL: gfortran.dg/typebound_operator_14.f90  -O  (internal compiler error)

Reply via email to