[flang] Check functions that implement defined operators (flang-compiler/f18#846)
authorTim Keith <tkeith@nvidia.com>
Mon, 2 Dec 2019 16:55:44 +0000 (08:55 -0800)
committerGitHub <noreply@github.com>
Mon, 2 Dec 2019 16:55:44 +0000 (08:55 -0800)
commitb0823c7b69dcad4b0539d903b61c8687753fe343
treecaccb705cba12e5b772f7fff4f47c25e996fdc7d
parent201119217fd8d3eac9e19d79cddc5e00d4c72500
[flang] Check functions that implement defined operators (flang-compiler/f18#846)

Section 15.4.3.4.2 specifies restrictions on functions that may be used
to implement an "extended-intrinsic-op". These checkw are implemented in
`CheckHelper::CheckDefinedOperator`.

Move `IsIntrinsicRelational` et al. to `semantics/tools.h` so that
the same logic is used to check both dummy and actual arguments.

Fix up tests that had errors that are now detected.

Original-commit: flang-compiler/f18@b900762eed5883bfbc31349847381098de1e7b6a
Reviewed-on: https://github.com/flang-compiler/f18/pull/846
12 files changed:
flang/lib/semantics/check-declarations.cc
flang/lib/semantics/expression.cc
flang/lib/semantics/expression.h
flang/lib/semantics/tools.cc
flang/lib/semantics/tools.h
flang/test/semantics/CMakeLists.txt
flang/test/semantics/resolve11.f90
flang/test/semantics/resolve13.f90
flang/test/semantics/resolve25.f90
flang/test/semantics/resolve53.f90
flang/test/semantics/resolve63.f90
flang/test/semantics/resolve67.f90 [new file with mode: 0644]