mirror of
https://forge.sourceware.org/marek/gcc.git
synced 2026-02-22 12:00:11 -05:00
Here, we were trying to instantiate the default argument before setting DECL_FRIEND_CONTEXT, so that the instantiated lambda ended up being treated as part of the S template, which confused dwarf2out. * pt.c (tsubst_function_decl): SET_DECL_FRIEND_CONTEXT sooner. From-SVN: r269081
11 lines
182 B
C
11 lines
182 B
C
// PR c++/89422
|
|
// { dg-do compile { target c++11 } }
|
|
// { dg-additional-options -g }
|
|
|
|
template <int> struct S
|
|
{
|
|
friend void foo (int a = []{ return 0; }()) {}
|
|
int b;
|
|
};
|
|
S<0> t;
|