aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/constexpr.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2018-02-01 21:07:09 -0500
committerJason Merrill <jason@gcc.gnu.org>2018-02-01 21:07:09 -0500
commitfe23b12a23e357103a40fda08df33f3547f112e6 (patch)
tree1eeccbcc99f8325a3a6b6c4e7886433ffdff17e1 /gcc/cp/constexpr.c
parent60a57222fe2166519b54641766bccab92fa15606 (diff)
downloadgcc-fe23b12a23e357103a40fda08df33f3547f112e6.zip
gcc-fe23b12a23e357103a40fda08df33f3547f112e6.tar.gz
gcc-fe23b12a23e357103a40fda08df33f3547f112e6.tar.bz2
PR c++/84160 - ICE with nested variadic capture.
* lambda.c (is_capture_proxy_with_ref): New. (insert_capture_proxy): Don't set DECL_CAPTURED_VARIABLE from a COMPONENT_REF. * expr.c (mark_use): Use is_capture_proxy_with_ref. * constexpr.c (potential_constant_expression_1): Likewise. * semantics.c (process_outer_var_ref): Likewise. From-SVN: r257325
Diffstat (limited to 'gcc/cp/constexpr.c')
-rw-r--r--gcc/cp/constexpr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 1390405..171c389 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -5369,7 +5369,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now,
case VAR_DECL:
if (DECL_HAS_VALUE_EXPR_P (t))
{
- if (now && is_normal_capture_proxy (t))
+ if (now && is_capture_proxy_with_ref (t))
{
/* -- in a lambda-expression, a reference to this or to a
variable with automatic storage duration defined outside that