summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0274-PR-tree-optimization-49000.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0274-PR-tree-optimization-49000.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0274-PR-tree-optimization-49000.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0274-PR-tree-optimization-49000.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0274-PR-tree-optimization-49000.patch
new file mode 100644
index 0000000000..dfc7a3cd54
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0274-PR-tree-optimization-49000.patch
@@ -0,0 +1,52 @@
1From 2d5c4b99176636cc96004730fb540a66ee5c209b Mon Sep 17 00:00:00 2001
2From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Wed, 18 May 2011 09:31:25 +0000
4Subject: [PATCH] PR tree-optimization/49000
5 * tree-ssa.c (execute_update_addresses_taken): Call
6 maybe_rewrite_mem_ref_base on debug stmt value. If it couldn't
7 be rewritten and decl has been marked for renaming, reset
8 the debug stmt.
9
10 * gcc.dg/pr49000.c: New test.
11
12
13git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173851 138bc75d-0d04-0410-961f-82ee72b054a4
14
15diff --git a/gcc/testsuite/gcc.dg/pr49000.c b/gcc/testsuite/gcc.dg/pr49000.c
16new file mode 100644
17index 0000000..32a1cdb
18--- /dev/null
19+++ b/gcc/testsuite/gcc.dg/pr49000.c
20@@ -0,0 +1,29 @@
21+/* PR tree-optimization/49000 */
22+/* { dg-do compile } */
23+/* { dg-options "-O2 -g" } */
24+
25+static
26+foo (int x, int y)
27+{
28+ return x * y;
29+}
30+
31+static int
32+bar (int *z)
33+{
34+ return *z;
35+}
36+
37+void
38+baz (void)
39+{
40+ int a = 42;
41+ int *b = &a;
42+ foo (bar (&a), 3);
43+}
44+
45+void
46+test (void)
47+{
48+ baz ();
49+}
50--
511.7.0.4
52