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

Steve Kargl <kargl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #3 from Steve Kargl <kargl at gcc dot gnu.org> ---
(In reply to Jerry DeLisle from comment #2)
> Created attachment 64714 [details]
> Preliminary patch
> 
> This patch fixes the ICE and explains a bit about the problem. It does not
> address the question on whether to error on the REAL value as an index value.

It's a GNU extension to accept a REAL valued start,end,stride.
See resolve.cc:8412

/* Resolve the expressions in an iterator structure.  If REAL_OK is
   false allow only INTEGER type iterators, otherwise allow REAL types.
   Set own_scope to true for ac-implied-do and data-implied-do as those
   have a separate scope such that, e.g., a INTENT(IN) doesn't apply.  */

bool
gfc_resolve_iterator (gfc_iterator *iter, bool real_ok, bool own_scope)

and resolve.cc:8376.

/* Resolve an expression from an iterator.  They must be scalar and have
   INTEGER or (optionally) REAL type.  */

static bool
gfc_resolve_iterator_expr (gfc_expr *expr, bool real_ok,



I have no idea why this is allowed.

Reply via email to