[flang] Preserve errors from generic matching
authorPeter Klausler <pklausler@nvidia.com>
Tue, 18 Jul 2023 23:14:49 +0000 (16:14 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Fri, 21 Jul 2023 20:00:04 +0000 (13:00 -0700)
commitfe33374fbff267e54e543745b98f826e05c8bab8
tree8e80dbf50ffa5ea62a16c3878c83a53ea04c3c81
parent8c33630e15c8c630804058f0820b8876e5674d71
[flang] Preserve errors from generic matching

When searching for a matching specific procedure for a set of actual
arguments in a type-bound generic interface for a defined operator,
don't discard any error messages that may have been produced for
the specific that was found.  Tweak the code to preserve those
messages and add them to the context's messages, and add a test.

Differential Revision: https://reviews.llvm.org/D155966
flang/lib/Semantics/expression.cpp
flang/test/Semantics/pure01.f90 [new file with mode: 0644]