summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0364-2011-05-29-Richard-Guenther-rguenther-suse.de.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0364-2011-05-29-Richard-Guenther-rguenther-suse.de.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0364-2011-05-29-Richard-Guenther-rguenther-suse.de.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0364-2011-05-29-Richard-Guenther-rguenther-suse.de.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0364-2011-05-29-Richard-Guenther-rguenther-suse.de.patch
new file mode 100644
index 0000000000..251260accf
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0364-2011-05-29-Richard-Guenther-rguenther-suse.de.patch
@@ -0,0 +1,68 @@
1From d5ea0b26fccb8359f0edce472053beca74f50f93 Mon Sep 17 00:00:00 2001
2From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Sun, 29 May 2011 17:00:13 +0000
4Subject: [PATCH] 2011-05-29 Richard Guenther <rguenther@suse.de>
5
6 PR tree-optimization/49217
7 * ipa-pure-const.c (propagate_pure_const): Fix typos.
8
9 * gcc.dg/torture/pr49217.c: New testcase.
10
11
12git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@174399 138bc75d-0d04-0410-961f-82ee72b054a4
13
14index 3b4cc02..b9476e6 100644
15--- a/gcc/ipa-pure-const.c
16+++ b/gcc/ipa-pure-const.c
17@@ -1223,7 +1223,7 @@ propagate_pure_const (void)
18 break;
19
20 /* Now process the indirect call. */
21- for (ie = node->indirect_calls; ie; ie = ie->next_callee)
22+ for (ie = w->indirect_calls; ie; ie = ie->next_callee)
23 {
24 enum pure_const_state_e edge_state = IPA_CONST;
25 bool edge_looping = false;
26@@ -1246,7 +1246,7 @@ propagate_pure_const (void)
27 break;
28
29 /* And finally all loads and stores. */
30- for (i = 0; ipa_ref_list_reference_iterate (&node->ref_list, i, ref); i++)
31+ for (i = 0; ipa_ref_list_reference_iterate (&w->ref_list, i, ref); i++)
32 {
33 enum pure_const_state_e ref_state = IPA_CONST;
34 bool ref_looping = false;
35new file mode 100644
36index 0000000..e8a89de
37--- /dev/null
38+++ b/gcc/testsuite/gcc.dg/torture/pr49217.c
39@@ -0,0 +1,26 @@
40+/* { dg-do run } */
41+/* { dg-options "-fno-early-inlining" } */
42+
43+extern void abort (void);
44+int i;
45+static void foo(void);
46+void __attribute__((noinline))
47+bar (void)
48+{
49+ if (!i)
50+ foo ();
51+}
52+static void
53+foo(void)
54+{
55+ i = 1;
56+ bar ();
57+}
58+int main()
59+{
60+ i = 0;
61+ bar();
62+ if (i != 1)
63+ abort ();
64+ return 0;
65+}
66--
671.7.0.4
68