blob: 95cf4553fb2ed6381ce04d8e6ae82958b1e0e74f [file] [log] [blame]
// Origin PR c++/47291
// { dg-options "-gdwarf-2 -dA" }
// { dg-do compile }
struct S;
template< int S::* cst> struct D {};
struct S
{
int i;
D < &S::i > di; //<-- folding &S::i was failing
// because i has no offset as S is not laid out yet
};
int
main()
{
S s;
return s.i;
}
// { dg-final { scan-assembler-times "DIE \\(\[^\n\r\]*\\) DW_TAG_template_value_param" 1 } }