aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constexpr.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-03-26 10:20:16 -0400
committerPatrick Palka <ppalka@redhat.com>2022-03-26 10:20:16 -0400
commit04f19580e8dbdbc7366d0f5fd068aa0cecafdc9d (patch)
tree39273eb9e1a7b1a695fbf64096396ad866ce1fdd /gcc/cp/constexpr.cc
parentede5f5224d55b84b9f186b288164df9c06fd85e7 (diff)
downloadgcc-04f19580e8dbdbc7366d0f5fd068aa0cecafdc9d.zip
gcc-04f19580e8dbdbc7366d0f5fd068aa0cecafdc9d.tar.gz
gcc-04f19580e8dbdbc7366d0f5fd068aa0cecafdc9d.tar.bz2
c++: ICE when building builtin operator->* set [PR103455]
Here when constructing the builtin operator->* candidate set according to the available conversion functions for the operand types, we end up considering a candidate with C1=T (through B's dependent conversion function) and C2=F, during which we crash from DERIVED_FROM_P because dependent_type_p sees a TEMPLATE_TYPE_PARM outside of a template context. Sidestepping the question of whether we should be considering such a dependent conversion function here in the first place, it seems futile to test DERIVED_FROM_P for anything other than an actual class type, so this patch fixes this ICE by simply guarding the DERIVED_FROM_P test with CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P. PR c++/103455 gcc/cp/ChangeLog: * call.cc (add_builtin_candidate) <case MEMBER_REF>: Test CLASS_TYPE_P instead of MAYBE_CLASS_TYPE_P. gcc/testsuite/ChangeLog: * g++.dg/overload/builtin6.C: New test.
Diffstat (limited to 'gcc/cp/constexpr.cc')
0 files changed, 0 insertions, 0 deletions