summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0143-PR-middle-end-48661.patch
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-06-17 17:11:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-06-23 11:50:07 +0100
commit0faa5f72999fea82fadda8bab70abea2303216c7 (patch)
tree05a8c18d2f67d883f94d2bd6f060ab0f4ac7f156 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0143-PR-middle-end-48661.patch
parentc2007ba4cdb64fa9e308d3dae395c03ef4cc9161 (diff)
downloadpoky-0faa5f72999fea82fadda8bab70abea2303216c7.tar.gz
gcc-4.6: Switch to using svn SRC_URI for recipe
We call the recipes 4.6 Remove the backport patches (From OE-Core rev: 68b545f4ff719f2b6e57d68b002dc9845c7a14ae) 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/0143-PR-middle-end-48661.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0143-PR-middle-end-48661.patch166
1 files changed, 0 insertions, 166 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0143-PR-middle-end-48661.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0143-PR-middle-end-48661.patch
deleted file mode 100644
index ff5a9e0fc7..0000000000
--- a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0143-PR-middle-end-48661.patch
+++ /dev/null
@@ -1,166 +0,0 @@
1From 6d925e0321b8a34fb21b00a202c07d3d8a6e389a Mon Sep 17 00:00:00 2001
2From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Mon, 18 Apr 2011 21:58:03 +0000
4Subject: [PATCH] PR middle-end/48661
5 * gimple-fold.c (gimple_get_virt_method_for_binfo): Return NULL
6 if TREE_TYPE (v) is non-NULL.
7
8 * gimple-fold.c (gimple_get_virt_method_for_binfo): Renamed from
9 gimple_get_virt_mehtod_for_binfo.
10 * gimple.h (gimple_get_virt_method_for_binfo): Likewise.
11 * ipa-cp.c (ipcp_process_devirtualization_opportunities): Adjust
12 callers.
13 * ipa-prop.c (try_make_edge_direct_virtual_call): Likewise.
14
15 * g++.dg/torture/pr48661.C: New test.
16
17
18git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@172676 138bc75d-0d04-0410-961f-82ee72b054a4
19
20index abc2273..1b82e12 100644
21--- a/gcc/gimple-fold.c
22+++ b/gcc/gimple-fold.c
23@@ -1374,7 +1374,7 @@ gimple_fold_builtin (gimple stmt)
24 is a thunk (other than a this adjustment which is dealt with by DELTA). */
25
26 tree
27-gimple_get_virt_mehtod_for_binfo (HOST_WIDE_INT token, tree known_binfo,
28+gimple_get_virt_method_for_binfo (HOST_WIDE_INT token, tree known_binfo,
29 tree *delta, bool refuse_thunks)
30 {
31 HOST_WIDE_INT i;
32@@ -1393,6 +1393,10 @@ gimple_get_virt_mehtod_for_binfo (HOST_WIDE_INT token, tree known_binfo,
33 v = TREE_CHAIN (v);
34 }
35
36+ /* If BV_VCALL_INDEX is non-NULL, give up. */
37+ if (TREE_TYPE (v))
38+ return NULL_TREE;
39+
40 fndecl = TREE_VALUE (v);
41 node = cgraph_get_node_or_alias (fndecl);
42 if (refuse_thunks
43diff --git a/gcc/gimple.h b/gcc/gimple.h
44index cc35b60..fca3d55 100644
45--- a/gcc/gimple.h
46+++ b/gcc/gimple.h
47@@ -892,7 +892,7 @@ unsigned get_gimple_rhs_num_ops (enum tree_code);
48 gimple gimple_alloc_stat (enum gimple_code, unsigned MEM_STAT_DECL);
49 const char *gimple_decl_printable_name (tree, int);
50 bool gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace);
51-tree gimple_get_virt_mehtod_for_binfo (HOST_WIDE_INT, tree, tree *, bool);
52+tree gimple_get_virt_method_for_binfo (HOST_WIDE_INT, tree, tree *, bool);
53 void gimple_adjust_this_by_delta (gimple_stmt_iterator *, tree);
54 /* Returns true iff T is a valid GIMPLE statement. */
55 extern bool is_gimple_stmt (tree);
56diff --git a/gcc/ipa-cp.c b/gcc/ipa-cp.c
57index aad5d78..7f5a4c6 100644
58--- a/gcc/ipa-cp.c
59+++ b/gcc/ipa-cp.c
60@@ -1242,7 +1242,7 @@ ipcp_process_devirtualization_opportunities (struct cgraph_node *node)
61 {
62 tree binfo = VEC_index (tree, info->params[param_index].types, j);
63 tree d;
64- tree t = gimple_get_virt_mehtod_for_binfo (token, binfo, &d, true);
65+ tree t = gimple_get_virt_method_for_binfo (token, binfo, &d, true);
66
67 if (!t)
68 {
69diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
70index 589bc16..d89bf6d 100644
71--- a/gcc/ipa-prop.c
72+++ b/gcc/ipa-prop.c
73@@ -1730,7 +1730,7 @@ try_make_edge_direct_virtual_call (struct cgraph_edge *ie,
74 type = ie->indirect_info->otr_type;
75 binfo = get_binfo_at_offset (binfo, ie->indirect_info->anc_offset, type);
76 if (binfo)
77- target = gimple_get_virt_mehtod_for_binfo (token, binfo, &delta, true);
78+ target = gimple_get_virt_method_for_binfo (token, binfo, &delta, true);
79 else
80 return NULL;
81
82new file mode 100644
83index 0000000..8de2142
84--- /dev/null
85+++ b/gcc/testsuite/g++.dg/torture/pr48661.C
86@@ -0,0 +1,77 @@
87+// PR middle-end/48661
88+// { dg-do run }
89+
90+extern "C" void abort ();
91+
92+__attribute__((noinline))
93+double
94+foo (double x, double y)
95+{
96+ asm volatile ("" : : : "memory");
97+ return x + y;
98+}
99+
100+__attribute__((noinline, noclone))
101+void
102+bar (int x)
103+{
104+ if (x != 123)
105+ abort ();
106+}
107+
108+struct A
109+{
110+ double a1, a2;
111+};
112+
113+struct B
114+{
115+ virtual int m () const = 0 ;
116+};
117+
118+struct C
119+{
120+ virtual ~C () {}
121+};
122+
123+struct D : virtual public B, public C
124+{
125+ explicit D (const A &x) : d(123) { foo (x.a2, x.a1); }
126+ int m () const { return d; }
127+ int d;
128+};
129+
130+struct E
131+{
132+ E () : d(0) {}
133+ virtual void n (const B &x) { d = x.m (); x.m (); x.m (); }
134+ int d;
135+};
136+
137+void
138+test ()
139+{
140+ A a;
141+ a.a1 = 0;
142+ a.a2 = 1;
143+ E p;
144+ D q (a);
145+ const B &b = q;
146+ bar (b.m ());
147+ p.n (b);
148+ bar (p.d);
149+}
150+
151+void
152+baz ()
153+{
154+ A a;
155+ D p2 (a);
156+}
157+
158+int
159+main ()
160+{
161+ test ();
162+ return 0;
163+}
164--
1651.7.0.4
166