https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87394
Bug ID: 87394 Summary: gcc/fortran/decl.c:6466:16:Semantic Issue: variable 'stree' is used uninitialized whenever 'if' condition is false: -Wsometimes-uninitialized Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Problematic code snippet: ... gfc_symtree *stree; if (case1) gfc_get_sym_tree ("ppr@", gfc_current_ns, &stree, false); else if (case2) { gfc_symtree *st2; gfc_get_sym_tree ("ppr@", gfc_current_ns->parent, &stree, false); st2 = gfc_new_symtree (&gfc_current_ns->sym_root, "ppr@"); st2->n.sym = stree->n.sym; stree->n.sym->refs++; } sym->result = stree->n.sym; ...