summaryrefslogtreecommitdiff
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0258-PR-debug-48967.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-12 20:56:57 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-14 14:37:31 +0100
commit3968f33b6542cf20cf63cf49bfbc033bd2486295 (patch)
tree2bdb5e2f692a3bd3ecadbf2b4c7dc9f54485c737 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0258-PR-debug-48967.patch
parent022ca1d1357caafdfe23aa9ab82f90ba89b6942b (diff)
downloadopenembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.gz
openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.bz2
openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.tar.xz
openembedded-core-3968f33b6542cf20cf63cf49bfbc033bd2486295.zip
gcc-4.6.0: Bring in patches from FSF 4.6 branch
This brings in new patches from 4.6 release branch updates the comment section of existing branch to not contain patch numbers. Tested build on qemu for arm ppc mips x86 and x86_64 Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0258-PR-debug-48967.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0258-PR-debug-48967.patch134
1 files changed, 134 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0258-PR-debug-48967.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0258-PR-debug-48967.patch
new file mode 100644
index 000000000..c926a5971
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0258-PR-debug-48967.patch
@@ -0,0 +1,134 @@
+From 5581111b5be72638aebb478c70c2bafc0abd04e2 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Thu, 12 May 2011 11:59:32 +0000
+Subject: [PATCH] PR debug/48967
+ * var-tracking.c (use_narrower_mode_test) <case REG>: Return 1
+ if validate_subreg fails.
+
+ * g++.dg/opt/pr48967.C: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173702 138bc75d-0d04-0410-961f-82ee72b054a4
+
+index 5e328ff..be253f4 100644
+new file mode 100644
+index 0000000..db2ea54
+--- /dev/null
++++ b/gcc/testsuite/g++.dg/opt/pr48967.C
+@@ -0,0 +1,98 @@
++// PR debug/48967
++// { dg-do compile }
++// { dg-options "-g -O2" }
++
++template <typename> struct A;
++template <typename T> struct A <T *>
++{
++ typedef T ref;
++};
++template <typename T, typename> struct B
++{
++ typedef A <T> t;
++ typedef typename t::ref ref;
++ ref operator * () { return ref (); }
++};
++template <typename T> struct I
++{
++ typedef T *cp;
++ template <typename T1> struct J
++ {
++ typedef I <T1> other;
++ };
++};
++template <typename T> struct S : public I <T>
++{
++};
++template <typename T, typename _A> struct E
++{
++ typedef typename _A::template J <T>::other at;
++};
++template <typename T, typename _A = S <T> > struct D
++{
++ typedef E <T, _A> _Base;
++ typedef typename _Base::at at;
++ typedef typename at::cp cp;
++ typedef B <cp, D> H;
++};
++template <class T> struct F
++{
++ T *operator -> () { return __null; }
++};
++template <typename T> long
++lfloor (T x)
++{
++ return static_cast <long>(x) - (x && x != static_cast <long>(x));
++}
++template <typename T> long
++lround (T x)
++{
++ return lfloor (x - 0.5) + 1;
++}
++class M;
++template <typename> class P;
++typedef P <M> Q;
++template <typename> struct P
++{
++ float x ();
++};
++struct CV
++{
++ Q c;
++};
++struct C
++{
++ void foo (const CV &) const;
++ class O;
++ typedef D <F <O> > R;
++ R n;
++};
++struct S3
++{
++ S3 (int, int);
++};
++struct S2
++{
++ S3 sx, sy;
++ S2 (int x = 0, int y = 0, int s = 0, int t = 0) : sx (x, y), sy (s, t) {}
++};
++template <typename> struct N
++{
++ int bar ();
++};
++struct C::O
++{
++ N <float> o;
++ void foo (CV r, int)
++ {
++ Q c = r.c;
++ float t = 0.5 * (o.bar ());
++ S2 (lround (c.x ()), t);
++ }
++};
++void
++C::foo (const CV &w) const
++{
++ R::H m;
++ (*m)->foo (w, 8);
++}
+diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
+index 548afbc..b7ba0b9 100644
+--- a/gcc/var-tracking.c
++++ b/gcc/var-tracking.c
+@@ -739,6 +739,10 @@ use_narrower_mode_test (rtx *loc, void *data)
+ case REG:
+ if (cselib_lookup (*loc, GET_MODE (SUBREG_REG (subreg)), 0, VOIDmode))
+ return 1;
++ if (!validate_subreg (GET_MODE (subreg), GET_MODE (*loc),
++ *loc, subreg_lowpart_offset (GET_MODE (subreg),
++ GET_MODE (*loc))))
++ return 1;
+ return -1;
+ case PLUS:
+ case MINUS:
+--
+1.7.0.4
+