[Patch] PR fortran/93499 - ICE on division by zero in declaration statements

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Patch] PR fortran/93499 - ICE on division by zero in declaration statements

Harald Anlauf-3
Hi,

the attached should be mostly self-explaining.  Division by zero handling
appeared to be incomplete.  It was not dealt with properly when occurring
in declaration statements.  We now try to handle this.

OK for mainline?

Thanks,
Harald



PR fortran/93499 - ICE on division by zero in declaration statements

        Division by zero in declaration statements could sometimes
        generate NULL pointers being passed around that lead to ICEs.

gcc/fortran/ChangeLog:

2020-05-09  Harald Anlauf  <[hidden email]>

        PR fortran/93499
        * arith.c (gfc_divide): Catch division by zero.
        (eval_intrinsic_f3): Safeguard for NULL operands.

gcc/testsuite/ChangeLog:

2020-05-09  Harald Anlauf  <[hidden email]>

        PR fortran/93499
        * gfortran.dg/pr93499.f90: New test.


pr93499.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [Patch] PR fortran/93499 - ICE on division by zero in declaration statements

gcc - fortran mailing list
Hi Harald,

> the attached should be mostly self-explaining.  Division by zero handling
> appeared to be incomplete.  It was not dealt with properly when occurring
> in declaration statements.  We now try to handle this.
>
> OK for mainline?

OK.

Thanks for the patch!

Regards

        Thomas