http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55297
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |burnus at gcc dot gnu.org Target Milestone|--- |4.8.0 --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-13 11:19:24 UTC --- Seems to be due to http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189022 for PR fortran/41951 and PR fortran/49591. In the resolve.c's resolve_typebound_intrinsic_op: 11546 if (gfc_check_new_interface (derived->ns->op[op], target_proc, 11547 p->where) == FAILURE) Here target_proc->name == "negative" and target_proc->ns->proc_name->name == "athlete_module" The symbol (i.e. derived type) is resolved twice: Once for the "module athlete_module" (= gfc_current_ns->proc_name) and then again for the abstract interface procedure "sum_interface" (= gfc_current_ns->proc_name). In either case, one has derived->ns->proc_name->name == "athlete_module", which causes the symbol be added twice added to the same namespace. The question is whether it should be fixed by adding if (derived->ns != gfc_current_ns) return; Or using "gfc_current_ns" instead of "derived->ns". Or what's the most appropriate fix.