https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78122

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Ok, problem is that Fortran FE decides to make p STATIC in:

  /* Derived types are a bit peculiar because of the possibility of
     a default initializer; this must be applied each time the variable
     comes into scope it therefore need not be static.  These variables
     are SAVE_NONE but have an initializer.  Otherwise explicitly
     initialized variables are SAVE_IMPLICIT and explicitly saved are
     SAVE_EXPLICIT.  */
  if (!sym->attr.use_assoc
        && (sym->attr.save != SAVE_NONE || sym->attr.data
            || (sym->value && sym->ns->proc_name->attr.is_main_program)
            || (flag_coarray == GFC_FCOARRAY_LIB
                && sym->attr.codimension && !sym->attr.allocatable)))
    TREE_STATIC (decl) = 1;

and thus call graph is unhappy as there's a reference between a varpool symbol
and a local variable. I quess it must be fixed in the FE.

Reply via email to