]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fortran: check type of operands of logical operations, comparisons [PR107272]
authorHarald Anlauf <anlauf@gmx.de>
Sun, 16 Oct 2022 18:32:27 +0000 (20:32 +0200)
committerHarald Anlauf <anlauf@gmx.de>
Mon, 17 Oct 2022 16:59:24 +0000 (18:59 +0200)
commit34cecde675be67543b386b593132ce8b1bb0a3ab
treefa13d8d62eea22add2b8185ed6fe1be0776d27af
parent8950288333162caa68b85c71ed2d02f40976ddb9
Fortran: check type of operands of logical operations, comparisons [PR107272]

gcc/fortran/ChangeLog:

PR fortran/107272
* arith.cc (gfc_arith_not): Operand must be of type BT_LOGICAL.
(gfc_arith_and): Likewise.
(gfc_arith_or): Likewise.
(gfc_arith_eqv): Likewise.
(gfc_arith_neqv): Likewise.
(gfc_arith_eq): Compare consistency of types of operands.
(gfc_arith_ne): Likewise.
(gfc_arith_gt): Likewise.
(gfc_arith_ge): Likewise.
(gfc_arith_lt): Likewise.
(gfc_arith_le): Likewise.

gcc/testsuite/ChangeLog:

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