]> gcc.gnu.org Git - gcc.git/commit
PR fortran/95053 - division by zero constants
authorHarald Anlauf <anlauf@gmx.de>
Mon, 18 May 2020 18:27:29 +0000 (20:27 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 18 May 2020 18:27:29 +0000 (20:27 +0200)
commite5abd1cb9160619721336ed800779a01548231f1
tree074aab3a0818e1397808b016439d56afc5ac9125
parent2c832ffedf06ff614fc36c44ab6c892d84075e08
PR fortran/95053 - division by zero constants

Partially revert the fix for PR93499.  Replace by checks for valid
expressions in the declaration of array shape and PDT KIND and LEN
expressions at a later stage.

gcc/fortran/

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

PR fortran/95053
* arith.c (gfc_divide): Revert hunk introduced by patch for
PR93499.
* decl.c (variable_decl): Generate error for array shape not being
an INTEGER constant.
(gfc_get_pdt_instance): Generate error if KIND or LEN expressions
in declaration of a PDT instance do not simplify to INTEGER
constants.

gcc/testsuite/

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

PR fortran/95053
* gfortran.dg/dec_structure_23.f90: Adjust to new error messages.
* gfortran.dg/pr93499.f90: Adjust to new error messages.
* gfortran.dg/pr95053_2.f90: New test.
* gfortran.dg/pr95053_3.f90: New test.
gcc/fortran/ChangeLog
gcc/fortran/arith.c
gcc/fortran/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/dec_structure_23.f90
gcc/testsuite/gfortran.dg/pr93499.f90
gcc/testsuite/gfortran.dg/pr95053_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr95053_3.f90 [new file with mode: 0644]
This page took 0.065215 seconds and 5 git commands to generate.