aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-array-bounds.cc
diff options
context:
space:
mode:
authorPatrick Palka <ppalka@redhat.com>2021-06-24 11:29:02 -0400
committerPatrick Palka <ppalka@redhat.com>2021-06-24 11:29:02 -0400
commitc06493dc30afbf65b14d783c7cd53f20877ef577 (patch)
tree17b3570f8df2167fd37f638c0c66d9f190c1653e /gcc/gimple-array-bounds.cc
parent178fb8df9315f2f8f45b7fe5faf11a9c2912cc28 (diff)
downloadgcc-c06493dc30afbf65b14d783c7cd53f20877ef577.zip
gcc-c06493dc30afbf65b14d783c7cd53f20877ef577.tar.gz
gcc-c06493dc30afbf65b14d783c7cd53f20877ef577.tar.bz2
c++: requires-expression folding [PR101182]
Here we're crashing because cp_fold_function walks into the (templated) requirements of a requires-expression outside a template, but the folding routines aren't prepared to handle templated trees. This patch fixes this by making cp_fold use evaluate_requires_expr to fold a requires-expression as a whole, which also means we no longer need to explicitly do so during gimplification. (Note that we delay folding of such requires-expressions for sake of better diagnostics when one is used as the condition of a failed static_assert.) PR c++/101182 gcc/cp/ChangeLog: * constraint.cc (evaluate_requires_expr): Adjust function comment. * cp-gimplify.c (cp_genericize_r) <case REQUIRES_EXPR>: Move to ... (cp_fold) <case REQUIRES_EXPR>: ... here. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-requires25.C: New test.
Diffstat (limited to 'gcc/gimple-array-bounds.cc')
0 files changed, 0 insertions, 0 deletions