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

--- Comment #8 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Fri, Feb 01, 2019 at 05:52:34PM +0000, jakub at gcc dot gnu.org wrote:
> --- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Created attachment 45589
>   --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45589&action=edit
> gcc9-pr89084.patch
> 
> Untested fix.
> 

Jakub, 

Thanks for analyzing the bug.  I think your patch is
correct.  The only place that sym->ns-construct_entities
is set in

/* Set up the local namespace for a BLOCK construct.  */

gfc_namespace*
gfc_build_block_ns (gfc_namespace *parent_ns)
{
  gfc_namespace* my_ns;
  static int numblock = 1;

  my_ns = gfc_get_namespace (parent_ns, 1);
  my_ns->construct_entities = 1;

Thus, the sym appears in a block construct.

Learn something new everyday.

Reply via email to