8sa1-gcc/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice28.C
Marek Polacek 743ee9d5fe 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
2018-03-02 17:55:28 +00:00

10 lines
171 B
C

// 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" }
}