PR fortran/93499 - ICE on division by zero in declaration statements
authorHarald Anlauf <anlauf@gmx.de>
Sun, 10 May 2020 17:46:06 +0000 (19:46 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Sun, 10 May 2020 17:46:06 +0000 (19:46 +0200)
commit92ed82367e7ccf5e031e9cb7c653c14a2d64ca89
tree528e107b9a21b3009080c3a34032b0ffd54629be
parentef6394205d7bcab00dca01182d708ad5a6360a7b
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.

2020-05-10  Harald Anlauf  <anlauf@gmx.de>

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

gcc/testsuite/
PR fortran/93499
* gfortran.dg/pr93499.f90: New test.
gcc/fortran/ChangeLog
gcc/fortran/arith.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr93499.f90 [new file with mode: 0644]