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

--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Apr 13, 2021 at 08:49:35PM +0000, anlauf at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63797
> 
> --- Comment #4 from anlauf at gcc dot gnu.org ---
> The following patch regtests ok and fixes the testcase:
> 
> diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
> index 4db0a3ac76d..b4b7b437f86 100644
> --- a/gcc/fortran/module.c
> +++ b/gcc/fortran/module.c
> @@ -6218,6 +6218,9 @@ write_symtree (gfc_symtree *st)
>    if (check_unique_name (st->name))
>      return;
> 
> +  if (strcmp (sym->module, "(intrinsic)") == 0)
> +    return;
> +
>    p = find_pointer (sym);
>    if (p == NULL)
>      gfc_internal_error ("write_symtree(): Symbol not written");
> 
> 
> It even fixes the slightly reduced & refined testcase:
> 

Harald, if this survives regression testing, it might be
appropriate to commit.  The only issue I can think of 
is procedure pointers.  I don't use them, but if one can
point at sqrt (or dsqrt, i.e.,  with specific vs generic
name), then is [d]sqrt needed to be written into the module?

Reply via email to