diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0382-PR-c-49276.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0382-PR-c-49276.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0382-PR-c-49276.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0382-PR-c-49276.patch new file mode 100644 index 0000000000..bedf16cc45 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0382-PR-c-49276.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 85632cd24fa3d7f890fe9537936088c42792970c Mon Sep 17 00:00:00 2001 | ||
2 | From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Fri, 3 Jun 2011 20:21:38 +0000 | ||
4 | Subject: [PATCH] PR c++/49276 | ||
5 | * mangle.c (write_nested_name): Use CP_DECL_CONTEXT instead of | ||
6 | DECL_CONTEXT. | ||
7 | |||
8 | * g++.dg/cpp0x/lambda/lambda-mangle2.C: New test. | ||
9 | |||
10 | |||
11 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174620 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
12 | |||
13 | index f063d47..be4ef0a 100644 | ||
14 | --- a/gcc/cp/mangle.c | ||
15 | +++ b/gcc/cp/mangle.c | ||
16 | @@ -1,6 +1,6 @@ | ||
17 | /* Name mangling for the 3.0 C++ ABI. | ||
18 | - Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 | ||
19 | - Free Software Foundation, Inc. | ||
20 | + Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, | ||
21 | + 2011 Free Software Foundation, Inc. | ||
22 | Written by Alex Samuel <samuel@codesourcery.com> | ||
23 | |||
24 | This file is part of GCC. | ||
25 | @@ -943,7 +943,7 @@ write_nested_name (const tree decl) | ||
26 | else | ||
27 | { | ||
28 | /* No, just use <prefix> */ | ||
29 | - write_prefix (DECL_CONTEXT (decl)); | ||
30 | + write_prefix (CP_DECL_CONTEXT (decl)); | ||
31 | write_unqualified_name (decl); | ||
32 | } | ||
33 | write_char ('E'); | ||
34 | new file mode 100644 | ||
35 | index 0000000..4b7d15a | ||
36 | --- /dev/null | ||
37 | +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C | ||
38 | @@ -0,0 +1,21 @@ | ||
39 | +// PR c++/49276 | ||
40 | +// { dg-do compile } | ||
41 | +// { dg-options "-std=c++0x" } | ||
42 | + | ||
43 | +template <int N> | ||
44 | +struct F | ||
45 | +{ | ||
46 | + template <typename U> F (U); | ||
47 | +}; | ||
48 | + | ||
49 | +struct S | ||
50 | +{ | ||
51 | + void foo (F <0> x = [] {}) {} | ||
52 | +}; | ||
53 | + | ||
54 | +int | ||
55 | +main () | ||
56 | +{ | ||
57 | + S s; | ||
58 | + s.foo (); | ||
59 | +} | ||
60 | -- | ||
61 | 1.7.0.4 | ||
62 | |||