Commit 743ee9d5 by Marek Polacek Committed by Marek Polacek

re PR c++/84664 (internal compiler error: in cp_perform_integral_promotions, at cp/typeck.c:2172)

	PR c++/84664
	* typeck.c (cp_perform_integral_promotions): Check the result of
	mark_rvalue_use.

	* g++.dg/cpp0x/lambda/lambda-ice28.C: New test.

From-SVN: r258149
parent 8c8f2ab7
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
PR c++/84663 PR c++/84663
* decl.c (cp_complete_array_type): Check error_mark_node. * decl.c (cp_complete_array_type): Check error_mark_node.
PR c++/84664
* typeck.c (cp_perform_integral_promotions): Check the result of
mark_rvalue_use.
2018-03-02 Jakub Jelinek <jakub@redhat.com> 2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR c++/84662 PR c++/84662
......
...@@ -2161,6 +2161,8 @@ cp_perform_integral_promotions (tree expr, tsubst_flags_t complain) ...@@ -2161,6 +2161,8 @@ cp_perform_integral_promotions (tree expr, tsubst_flags_t complain)
tree promoted_type; tree promoted_type;
expr = mark_rvalue_use (expr); expr = mark_rvalue_use (expr);
if (error_operand_p (expr))
return error_mark_node;
/* [conv.prom] /* [conv.prom]
......
...@@ -6,6 +6,9 @@ ...@@ -6,6 +6,9 @@
PR c++/84663 PR c++/84663
* g++.dg/parse/array-size3.C: New test. * g++.dg/parse/array-size3.C: New test.
PR c++/84664
* g++.dg/cpp0x/lambda/lambda-ice28.C: New test.
2018-03-02 Jakub Jelinek <jakub@redhat.com> 2018-03-02 Jakub Jelinek <jakub@redhat.com>
PR c++/84662 PR c++/84662
......
// PR c++/84664
// { dg-do compile { target c++11 } }
void
foo ()
{
auto &b = 1; // { dg-error "cannot bind" }
[] { b > 0; }; // { dg-error ".b. is not captured" }
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment