[Bug fortran/125747] ICE in gfc_add_modify_loc, at fortran/trans.cc:229 since r16-5177
jvdelisle at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Jun 12 15:54:31 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125747
--- Comment #9 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to Harald Anlauf from comment #7)
> (In reply to Steve Kargl from comment #6)
> > (In reply to Harald Anlauf from comment #4)
> > >
> > > I think we should not allow this extension for modern DO constructs.
> > >
> >
> > I think it should be disallowed in FORALL as well. The error
> > message in resolve.cc(gfc_resolve_iterator) is guarded with
> > gfc_notify_std (GFC_STD_F95_DEL...). F95 never allowed REAL
> > iterators and FORALL was introduced in this standard.
> >
> > F95, p.114
> >
> > R750 forall-triplet-spec is index-name = subscript : subscript [ : stride]
> > R617 subscript is scalar-int-expr
> > R603 stride is scalar-int-expr
> >
> > If it breaks code in the wild, so what? The code was never correct.
>
> +1
>
> When I specify -std=f2023,
>
> do j = 1, 0.3
> end do
>
> is already rejected, and
>
> forall (j = 1:0.3)
> end forall
>
> anyway. So it is actually a regression...
I will make sure to take care of this while I am at it. I remember some history
on allowing the real index, however, unclearly.
More information about the Gcc-bugs
mailing list