Commit e9b398ae by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/49276 ([C++0x] Segmentation fault with default lambda parameter in member function)

	PR c++/49276
	* mangle.c (write_nested_name): Use CP_DECL_CONTEXT instead of
	DECL_CONTEXT.

	* g++.dg/cpp0x/lambda/lambda-mangle2.C: New test.

From-SVN: r174619
parent 543ad675
2011-06-03 Jakub Jelinek <jakub@redhat.com>
PR c++/49276
* mangle.c (write_nested_name): Use CP_DECL_CONTEXT instead of
DECL_CONTEXT.
2011-06-01 Jason Merrill <jason@redhat.com>
* pt.c (build_non_dependent_expr): Remove special handling of
......
/* Name mangling for the 3.0 C++ ABI.
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010,
2011 Free Software Foundation, Inc.
Written by Alex Samuel <samuel@codesourcery.com>
This file is part of GCC.
......@@ -943,7 +943,7 @@ write_nested_name (const tree decl)
else
{
/* No, just use <prefix> */
write_prefix (DECL_CONTEXT (decl));
write_prefix (CP_DECL_CONTEXT (decl));
write_unqualified_name (decl);
}
write_char ('E');
......
2011-06-03 Jakub Jelinek <jakub@redhat.com>
PR c++/49276
* g++.dg/cpp0x/lambda/lambda-mangle2.C: New test.
2011-06-03 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/headers.m: Do not include sarray.h and hash.h.
......
// PR c++/49276
// { dg-do compile }
// { dg-options "-std=c++0x" }
template <int N>
struct F
{
template <typename U> F (U);
};
struct S
{
void foo (F <0> x = [] {}) {}
};
int
main ()
{
S s;
s.foo ();
}
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