aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-02-13 00:40:11 -0500
committerJason Merrill <jason@redhat.com>2021-02-18 21:22:18 -0500
commit187d0d5871b1fa572b0238b4989fa067df56778f (patch)
tree4e944d1d7d0c29ce6c63f221e57c3336a4b996d0 /gcc/fortran/simplify.c
parentbf81237eccb1d5d2d8078b1d2c5a0b9cc0258d61 (diff)
downloadgcc-187d0d5871b1fa572b0238b4989fa067df56778f.zip
gcc-187d0d5871b1fa572b0238b4989fa067df56778f.tar.gz
gcc-187d0d5871b1fa572b0238b4989fa067df56778f.tar.bz2
c++: Tuple of self-dependent classes [PR96926]
When compiling this testcase, trying to resolve the initialization for the tuple member ends up recursively considering the same set of tuple constructor overloads, and since two of them separately depend on is_constructible, the one we try second fails to instantiate is_constructible because we're still in the middle of instantiating it the first time. Fixed by implementing an optimization that someone suggested we were already doing: if we see a non-template candidate that is a perfect match for all arguments, we can skip considering template candidates at all. It would be enough to do this only when LOOKUP_DEFAULTED, but it shouldn't hurt in other cases. gcc/cp/ChangeLog: PR c++/96926 * call.c (perfect_conversion_p): New. (perfect_candidate_p): New. (add_candidates): Ignore templates after a perfect non-template. gcc/testsuite/ChangeLog: PR c++/96926 * g++.dg/cpp0x/overload4.C: New test.
Diffstat (limited to 'gcc/fortran/simplify.c')
0 files changed, 0 insertions, 0 deletions