aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2022-12-19 14:59:43 -0500
committerPatrick Palka <ppalka@redhat.com>2022-12-19 15:26:37 -0500
commita7c8036b26082d8da001e05596777c5f911590e1 (patch)
treeea82a5dfb0304b3a29ece9f18a8da7ea45ef56a9 /gcc/c
parenta39f454f0faf0734c7d040c9d8523f71be821000 (diff)
downloadgcc-a7c8036b26082d8da001e05596777c5f911590e1.zip
gcc-a7c8036b26082d8da001e05596777c5f911590e1.tar.gz
gcc-a7c8036b26082d8da001e05596777c5f911590e1.tar.bz2
c++: ICE with concepts TS multiple auto deduction [PR101886]
In extract_autos_r, we need to recompute TYPE_CANONICAL for the template type parameter after adjusting its index, otherwise we end up with a comptypes ICE for the below testcase. Note that such in-place type adjustment isn't generally safe to do since the type could be the TYPE_CANONICAL of another (unadjusted) type, but in this case the canonical auto (of some level and 0 index) is the first auto (of that level) that's created, and so any auto that we do end up adjusting can't be the canonical one. PR c++/101886 gcc/cp/ChangeLog: * pt.cc (extract_autos_r): Recompute TYPE_CANONICAL after adjusting the template type parameter's index. Simplify by using TEMPLATE_TYPE_IDX. Add some sanity checks. gcc/testsuite/ChangeLog: * g++.dg/concepts/auto5.C: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions