diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0291-PR-c-48736.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0291-PR-c-48736.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0291-PR-c-48736.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0291-PR-c-48736.patch new file mode 100644 index 0000000000..c84e054c16 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0291-PR-c-48736.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 477084b940a43a7f5bdb411e422a736c1f356c6f Mon Sep 17 00:00:00 2001 | ||
2 | From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
3 | Date: Fri, 20 May 2011 19:02:08 +0000 | ||
4 | Subject: [PATCH] PR c++/48736 | ||
5 | * pt.c (tsubst_copy_and_build): Handle substitution of a pack | ||
6 | expansion producing another expansion. | ||
7 | |||
8 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173971 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
9 | |||
10 | index e1ddf84..d49fe6b 100644 | ||
11 | --- a/gcc/cp/pt.c | ||
12 | +++ b/gcc/cp/pt.c | ||
13 | @@ -13221,7 +13221,8 @@ tsubst_copy_and_build (tree t, | ||
14 | ce->value = tsubst_pack_expansion (ce->value, args, complain, | ||
15 | in_decl); | ||
16 | |||
17 | - if (ce->value == error_mark_node) | ||
18 | + if (ce->value == error_mark_node | ||
19 | + || PACK_EXPANSION_P (ce->value)) | ||
20 | ; | ||
21 | else if (TREE_VEC_LENGTH (ce->value) == 1) | ||
22 | /* Just move the argument into place. */ | ||
23 | new file mode 100644 | ||
24 | index 0000000..3ad5af4 | ||
25 | --- /dev/null | ||
26 | +++ b/gcc/testsuite/g++.dg/cpp0x/variadic108.C | ||
27 | @@ -0,0 +1,10 @@ | ||
28 | +// PR c++/48736 | ||
29 | +// { dg-options -std=c++0x } | ||
30 | + | ||
31 | +template<class T> | ||
32 | +T&& create(); | ||
33 | + | ||
34 | +template<class T, class... Args, | ||
35 | + class = decltype(T{create<Args>()...}) // Line X | ||
36 | +> | ||
37 | +char f(int); | ||
38 | -- | ||
39 | 1.7.0.4 | ||
40 | |||