https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116221
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvdelisle at gcc dot gnu.org --- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- It does get set here. One could set st = NULL at a higher level to get rid of the warning. bool gfc_find_sym_tree (const char *name, gfc_namespace *ns, int parent_flag, gfc_symtree **result) { gfc_symtree *st; if (ns == NULL) ns = gfc_current_ns; do { st = gfc_find_symtree (ns->sym_root, name); if (st != NULL) { select_type_insert_tmp (&st); *result = st; /* Ambiguous generic interfaces are permitted, as long as the specific interfaces are different. */ if (st->ambiguous && !st->n.sym->attr.generic) { ambiguous_symbol (name, st); return true; } return false; } if (!parent_flag) break; /* Don't escape an interface block. */ if (ns && !ns->has_import_set && ns->proc_name && ns->proc_name->attr.if_source == IFSRC_IFBODY) break; ns = ns->parent; } while (ns != NULL); if (gfc_current_state() == COMP_DERIVED && gfc_current_block ()->attr.pdt_template) { gfc_symbol *der = gfc_current_block (); for (; der; der = gfc_get_derived_super_type (der)) { if (der->f2k_derived && der->f2k_derived->sym_root) { st = gfc_find_symtree (der->f2k_derived->sym_root, name); if (st) break; } } *result = st; return false; } *result = NULL; return false;