This patch adjusts successful scalar virtual-call results to the static call type after caching the underlying function result. The cache therefore retains the final overrider's declared result type for direct calls.
Tested on x86_64-pc-linux-gnu with: g++.dg/cpp2a/pr126324.C g++.dg/cpp2a/constexpr*.C g++.dg/cpp2a/consteval*.C Thanks, Odysseas
PR126324.patch
Description: PR126324.patch
