Commit c7163b64 by Paolo Carlini Committed by Paolo Carlini

re PR c++/84518 (ICE with lambda capturing broken variable)

2019-03-07  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/84518
	* g++.dg/cpp0x/lambda/lambda-ice30.C: New.
	* g++.dg/cpp0x/lambda/lambda-ice31.C: Likewise.

From-SVN: r269469
parent 90a0bf4e
2019-03-07 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/84518
* g++.dg/cpp0x/lambda/lambda-ice30.C: New.
* g++.dg/cpp0x/lambda/lambda-ice31.C: Likewise.
2019-03-07 Jakub Jelinek <jakub@redhat.com> 2019-03-07 Jakub Jelinek <jakub@redhat.com>
PR translation/79999 PR translation/79999
......
// PR c++/84518
// { dg-do compile { target c++11 } }
template<int> void foo()
{
int x[=]; // { dg-error "expected" }
[&x]{};
}
void bar()
{
foo<0>();
}
// PR c++/84518
// { dg-do compile { target c++11 } }
template<typename T> void foo()
{
T x[=]; // { dg-error "expected" }
[&x]{};
}
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