diff mbox series

[Fortran] PR 82932: [8 Regression] [OOP] ICE in update_compcall_arglist, at fortran/resolve.c:5837

Message ID CAKwh3qgBpnQHeQNTCE=vZtS0wweWzUcvJ+D6S=xSrdtbdUHR5g@mail.gmail.com
State New
Headers show
Series [Fortran] PR 82932: [8 Regression] [OOP] ICE in update_compcall_arglist, at fortran/resolve.c:5837 | expand

Commit Message

Janus Weil Nov. 11, 2017, 12:01 p.m. UTC
Hi all,

here is a close-to-trivial patch for an ICE-on-invalid problem. It
regtests cleanly.

Ok for trunk? (If there are no objections, I'd like to commit this in
the coming days.)

Cheers,
Janus



2017-11-11  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/82932
    * resolve.c (update_compcall_arglist): Improve error recovery,
    remove a gcc_assert.

2017-11-11  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/82932
    * gfortran.dg/typebound_call_29.f90: New test.

Comments

Steve Kargl Nov. 11, 2017, 6:01 p.m. UTC | #1
On Sat, Nov 11, 2017 at 01:01:59PM +0100, Janus Weil wrote:
> 
> here is a close-to-trivial patch for an ICE-on-invalid problem. It
> regtests cleanly.
> 
> Ok for trunk? (If there are no objections, I'd like to commit this in
> the coming days.)
> 
> Cheers,
> Janus
> 
> 2017-11-11  Janus Weil  <janus@gcc.gnu.org>
> 
>     PR fortran/82932
>     * resolve.c (update_compcall_arglist): Improve error recovery,
>     remove a gcc_assert.
> 
> 2017-11-11  Janus Weil  <janus@gcc.gnu.org>
> 
>     PR fortran/82932
>     * gfortran.dg/typebound_call_29.f90: New test.

OK to commit.
Janus Weil Nov. 11, 2017, 9:59 p.m. UTC | #2
2017-11-11 19:01 GMT+01:00 Steve Kargl <sgk@troutmask.apl.washington.edu>:
> On Sat, Nov 11, 2017 at 01:01:59PM +0100, Janus Weil wrote:
>>
>> here is a close-to-trivial patch for an ICE-on-invalid problem. It
>> regtests cleanly.
>>
>> Ok for trunk? (If there are no objections, I'd like to commit this in
>> the coming days.)
>>
>> Cheers,
>> Janus
>>
>> 2017-11-11  Janus Weil  <janus@gcc.gnu.org>
>>
>>     PR fortran/82932
>>     * resolve.c (update_compcall_arglist): Improve error recovery,
>>     remove a gcc_assert.
>>
>> 2017-11-11  Janus Weil  <janus@gcc.gnu.org>
>>
>>     PR fortran/82932
>>     * gfortran.dg/typebound_call_29.f90: New test.
>
> OK to commit.

Thanks, Steve. Committed as r254660.

Cheers,
Janus
Steve Kargl Nov. 11, 2017, 10:16 p.m. UTC | #3
On Sat, Nov 11, 2017 at 10:59:05PM +0100, Janus Weil wrote:
> 2017-11-11 19:01 GMT+01:00 Steve Kargl <sgk@troutmask.apl.washington.edu>:
> > On Sat, Nov 11, 2017 at 01:01:59PM +0100, Janus Weil wrote:
> >>
> >> here is a close-to-trivial patch for an ICE-on-invalid problem. It
> >> regtests cleanly.
> >>
> >> Ok for trunk? (If there are no objections, I'd like to commit this in
> >> the coming days.)
> >>
> >> Cheers,
> >> Janus
> >>
> >> 2017-11-11  Janus Weil  <janus@gcc.gnu.org>
> >>
> >>     PR fortran/82932
> >>     * resolve.c (update_compcall_arglist): Improve error recovery,
> >>     remove a gcc_assert.
> >>
> >> 2017-11-11  Janus Weil  <janus@gcc.gnu.org>
> >>
> >>     PR fortran/82932
> >>     * gfortran.dg/typebound_call_29.f90: New test.
> >
> > OK to commit.
> 
> Thanks, Steve. Committed as r254660.

You're welcomed.  3 line patches are easy to review.
diff mbox series

Patch

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(revision 253982)
+++ gcc/fortran/resolve.c	(working copy)
@@ -5834,7 +5834,9 @@  update_compcall_arglist (gfc_expr* e)
       return true;
     }
 
-  gcc_assert (tbp->pass_arg_num > 0);
+  if (tbp->pass_arg_num <= 0)
+    return false;
+
   e->value.compcall.actual = update_arglist_pass (e->value.compcall.actual, po,
 						  tbp->pass_arg_num,
 						  tbp->pass_arg);