]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: check types of operands of arithmetic binary operations [PR107217]
authorHarald Anlauf <anlauf@gmx.de>
Tue, 11 Oct 2022 20:08:48 +0000 (22:08 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Wed, 12 Oct 2022 17:46:46 +0000 (19:46 +0200)
commit7858368c3f3875f6bf634119e5731dc3c808a7c3
tree24266b2b8b8ab28f00e6ae8493c25ecb86053b77
parentcaf9db5a7f99fae8b6088328b9b48ee79fa5e5f0
Fortran: check types of operands of arithmetic binary operations [PR107217]

gcc/fortran/ChangeLog:

PR fortran/107217
* arith.cc (gfc_arith_plus): Compare consistency of types of operands.
(gfc_arith_minus): Likewise.
(gfc_arith_times): Likewise.
(gfc_arith_divide): Likewise.
(arith_power): Check that both operands are of numeric type.

gcc/testsuite/ChangeLog:

PR fortran/107217
* gfortran.dg/pr107217.f90: New test.
gcc/fortran/arith.cc
gcc/testsuite/gfortran.dg/pr107217.f90 [new file with mode: 0644]