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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|PRINT the array constructed |ICE in
                   |from implied do-loop throw  |gfc_conv_array_initializer
                   |ICE                         |due to array expressions
                   |                            |within implied do-loop

--- Comment #7 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Steve Kargl from comment #6)

Hi Steve,

I didn't check for any new postings when I attached my version of the patch.
Apologies for treading on your toes.... again :-)

> PRINT has nothing to do with the problem.  I simply
> have no interest in fixing the changed and now misleading
> subject line.  I've been asked to stop.

Who asked you to stop? Anyway, I have added a slightly more informative subject
line.

> 
> My proposed patch fixes the issue in one spot.  Paul's
> patch fixes potentially many spots.  Unfortunately, the
> handling of implied do-loops is done in an ad hoc fashion,
> and is complicated by the potential problem of exhausting
> the stack.

I like your use of gfc_reduce_init_expr since it also does a type check. Note
though that it resets gfc_reduce_init_expr and so it needs to be set once again
after the call.

I had totally forgotten about the 'fatal' flag needing to be set in the call to
gfc_expand_constructor to avoid stack exhaustion. I had to rediscover it
experimentally.

A combined patch is being regtested now.

Cheers

Paul

Reply via email to