aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-04-05 23:35:56 -0400
committerPatrick Palka <ppalka@redhat.com>2021-04-05 23:35:56 -0400
commit66de517b1c1dd22df7914f8e9a083cd5a73adbe2 (patch)
tree9539038f2e247bbf24d4c95d88d9e6eeb483bac1 /gcc/tree-vect-loop.c
parentb1da991623341a2ecd97bf9034b93b0d63516517 (diff)
downloadgcc-66de517b1c1dd22df7914f8e9a083cd5a73adbe2.zip
gcc-66de517b1c1dd22df7914f8e9a083cd5a73adbe2.tar.gz
gcc-66de517b1c1dd22df7914f8e9a083cd5a73adbe2.tar.bz2
c++: placeholder type constraint in structured binding [PR99899]
In this PR, we're crashing because the constraint handling inside do_auto_deduction doesn't expect to see an adc_decomp_type context. This patch fixes this by treating adc_decomp_type like adc_variable_type or adc_return_type during placeholder type constraint checking. Meanwhile, I noticed we weren't checking constraints at all when binding an array via a structured binding, since do_auto_deduction would exit early and bypass the constraint check. This patch fixes this by replacing the early exit with an appropriate setup of the 'targs' vector. gcc/cp/ChangeLog: PR c++/99899 * pt.c (do_auto_deduction): Don't exit early when deducing the array type of a structured binding. Also handle adc_decomp_type during constraint checking. gcc/testsuite/ChangeLog: PR c++/99899 * g++.dg/cpp2a/concepts-placeholder7.C: New test. * g++.dg/cpp2a/concepts-placeholder8.C: New test.
Diffstat (limited to 'gcc/tree-vect-loop.c')
0 files changed, 0 insertions, 0 deletions