PR c++/80267 - ICE with nested capture of reference
PR c++/60992 * pt.c (tsubst_copy): Handle lookup finding a capture proxy. From-SVN: r246793
This commit is contained in:
parent
310ce882d9
commit
c60faeee9e
|
@ -1,3 +1,9 @@
|
|||
2017-04-07 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/80267 - ICE with nested capture of reference
|
||||
PR c++/60992
|
||||
* pt.c (tsubst_copy): Handle lookup finding a capture proxy.
|
||||
|
||||
2017-04-07 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR sanitizer/80348
|
||||
|
|
|
@ -14566,7 +14566,7 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
|
|||
{
|
||||
/* First try name lookup to find the instantiation. */
|
||||
r = lookup_name (DECL_NAME (t));
|
||||
if (r)
|
||||
if (r && !is_capture_proxy (r))
|
||||
{
|
||||
/* Make sure that the one we found is the one we want. */
|
||||
tree ctx = DECL_CONTEXT (t);
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// PR c++/80267
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template <typename> void a() {
|
||||
int b;
|
||||
auto &c = b;
|
||||
[&] {
|
||||
c;
|
||||
[&] { c; };
|
||||
};
|
||||
}
|
||||
void d() { a<int>(); }
|
Loading…
Reference in New Issue