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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|lto                         |fortran

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The reason is that idxs isn't added to the BIND_EXPR vars.  This is done in
gfc_process_block_locals, generate_local_vars and 
generate_local_decl.  The last one for FL_PARAMETER adds it if:
5738          if (sym->ns
5739              && sym->ns->parent
5740              && sym->ns->parent->code
5741              && sym->ns->parent->code->op == EXEC_BLOCK)
5742            {
5743              if (sym->attr.referenced)
5744                gfc_get_symbol_decl (sym);
5745              sym->mark = 1;
5746            }
Without the write stmt in there, sym->ns->parent->code->op is indeed EXEC_BLOCK
and it is added, but with write stmt in there it is for some reason EXEC_WRITE
instead.

Reply via email to