diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0178-PR-c-48707.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0178-PR-c-48707.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0178-PR-c-48707.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0178-PR-c-48707.patch new file mode 100644 index 0000000000..64a53d2b31 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0178-PR-c-48707.patch @@ -0,0 +1,46 @@ +From c2606fe2aa58ae13a13e7ff0b17da61e4565586d Mon Sep 17 00:00:00 2001 +From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Mon, 25 Apr 2011 21:53:57 +0000 +Subject: [PATCH 178/200] PR c++/48707 + * pt.c (value_dependent_expression_p): Handle type-dependent + expression. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172942 138bc75d-0d04-0410-961f-82ee72b054a4 + +index ed48203..fc5177d 100644 +--- a/gcc/cp/pt.c ++++ b/gcc/cp/pt.c +@@ -18068,6 +18068,11 @@ value_dependent_expression_p (tree expression) + if (DECL_P (expression) && type_dependent_expression_p (expression)) + return true; + ++ /* We shouldn't have gotten here for a type-dependent expression, but ++ let's handle it properly anyway. */ ++ if (TREE_TYPE (expression) == NULL_TREE) ++ return true; ++ + switch (TREE_CODE (expression)) + { + case IDENTIFIER_NODE: +new file mode 100644 +index 0000000..25354b3 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C +@@ -0,0 +1,14 @@ ++// PR c++/48707 ++// { dg-options -std=c++0x } ++ ++struct A { ++ static int a(); ++}; ++ ++template<typename X> ++struct B: A { ++ static int const b; ++}; ++ ++template<typename X> ++int const B<X>::b=B<X>::a(); +-- +1.7.0.4 + |