summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0074-PR-debug-48466.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-04-30 12:37:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-05 12:26:41 +0100
commit478deec11f3349d61b1a922f047dc958dc07262a (patch)
tree1843907b36de2bcb8f821d49d8c9a88014ef0dc7 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0074-PR-debug-48466.patch
parentd42dccf886983ba14ccc868041d7bea0cf1a260e (diff)
downloadpoky-478deec11f3349d61b1a922f047dc958dc07262a.tar.gz
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on FSF gcc-4_2-branch since 4.6.0 was released They will roll into 4.6.1 release once that happens in coming approx 6 months time then we can simply remove them thats the reason so use a separate .inc file to define the SRC_URI additions (From OE-Core rev: b0d5b9f12adbce2c4a0df6059f5671188cd32293) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0074-PR-debug-48466.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0074-PR-debug-48466.patch113
1 files changed, 113 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0074-PR-debug-48466.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0074-PR-debug-48466.patch
new file mode 100644
index 0000000000..bd239012ac
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0074-PR-debug-48466.patch
@@ -0,0 +1,113 @@
1From da3ed31e2090c6b8236bbc3be69433aca0d445f1 Mon Sep 17 00:00:00 2001
2From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Wed, 6 Apr 2011 20:40:24 +0000
4Subject: [PATCH 074/200] PR debug/48466
5 * dwarf2out.c (based_loc_descr): If drap_reg is INVALID_REGNUM, use
6 as base_reg whatever register reg has been eliminated to, instead
7 of hardcoding STACK_POINTER_REGNUM.
8
9 * gcc.dg/guality/pr36977.c: New test.
10 * gcc.dg/guality/pr48466.c: New test.
11
12
13git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172064 138bc75d-0d04-0410-961f-82ee72b054a4
14
15index 1e5917c..68d56b0 100644
16--- a/gcc/dwarf2out.c
17+++ b/gcc/dwarf2out.c
18@@ -13545,7 +13545,7 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset,
19 int base_reg
20 = DWARF_FRAME_REGNUM ((fde && fde->drap_reg != INVALID_REGNUM)
21 ? HARD_FRAME_POINTER_REGNUM
22- : STACK_POINTER_REGNUM);
23+ : REGNO (elim));
24 return new_reg_loc_descr (base_reg, offset);
25 }
26
27new file mode 100644
28index 0000000..3689fae
29--- /dev/null
30+++ b/gcc/testsuite/gcc.dg/guality/pr36977.c
31@@ -0,0 +1,32 @@
32+/* PR debug/36977 */
33+/* { dg-do run } */
34+/* { dg-options "-g" } */
35+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
36+
37+void
38+foo ()
39+{
40+}
41+
42+int
43+main ()
44+{
45+ struct { char c[100]; } cbig;
46+ struct { int i[800]; } ibig;
47+ struct { long l[900]; } lbig;
48+ struct { float f[200]; } fbig;
49+ struct { double d[300]; } dbig;
50+ struct { short s[400]; } sbig;
51+
52+ ibig.i[0] = 55; /* { dg-final { gdb-test 30 "ibig.i\[0\]" "55" } } */
53+ ibig.i[100] = 5; /* { dg-final { gdb-test 30 "ibig.i\[100\]" "5" } } */
54+ cbig.c[0] = '\0'; /* { dg-final { gdb-test 30 "cbig.c\[0\]" "'\\0'" } } */
55+ cbig.c[99] = 'A'; /* { dg-final { gdb-test 30 "cbig.c\[99\]" "'A'" } } */
56+ fbig.f[100] = 11.0; /* { dg-final { gdb-test 30 "fbig.f\[100\]" "11" } } */
57+ dbig.d[202] = 9.0; /* { dg-final { gdb-test 30 "dbig.d\[202\]" "9" } } */
58+ sbig.s[90] = 255; /* { dg-final { gdb-test 30 "sbig.s\[90\]" "255" } } */
59+ lbig.l[333] = 999; /* { dg-final { gdb-test 30 "lbig.l\[333\]" "999" } } */
60+
61+ foo ();
62+ return 0;
63+}
64diff --git a/gcc/testsuite/gcc.dg/guality/pr48466.c b/gcc/testsuite/gcc.dg/guality/pr48466.c
65new file mode 100644
66index 0000000..8d5426a
67--- /dev/null
68+++ b/gcc/testsuite/gcc.dg/guality/pr48466.c
69@@ -0,0 +1,41 @@
70+/* PR debug/48466 */
71+/* { dg-do run } */
72+/* { dg-options "-g" } */
73+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
74+
75+struct S { unsigned int a; unsigned int *b; };
76+struct T { struct S a; struct S b; };
77+struct U { const char *u; };
78+int n[10];
79+volatile int v;
80+
81+struct U
82+foo (const char *s)
83+{
84+ struct U r;
85+ r.u = s;
86+ return r;
87+}
88+
89+void
90+bar (struct T *s, int a, int b)
91+{
92+ s->a.a = a;
93+ s->a.b = &s->a.a;
94+ s->b.a = b;
95+ s->b.b = &s->b.a;
96+}
97+
98+int
99+main ()
100+{
101+ struct T t;
102+ struct U x = foo ("this is x");
103+ struct S y, z;
104+ y.b = n; /* { dg-final { gdb-test 38 "t.a.a" "17" } } */
105+ y.a = 0; /* { dg-final { gdb-test 38 "*t.a.b" "17" } } */
106+ bar (&t, 17, 21); /* { dg-final { gdb-test 38 "t.b.a" "21" } } */
107+ v++; /* { dg-final { gdb-test 38 "*t.b.b" "21" } } */
108+ z = y;
109+ return 0;
110+}
111--
1121.7.0.4
113