diff options
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.patch | 52 |
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 @@ +From 2d5c4b99176636cc96004730fb540a66ee5c209b Mon Sep 17 00:00:00 2001 +From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Wed, 18 May 2011 09:31:25 +0000 +Subject: [PATCH] PR tree-optimization/49000 + * tree-ssa.c (execute_update_addresses_taken): Call + maybe_rewrite_mem_ref_base on debug stmt value. If it couldn't + be rewritten and decl has been marked for renaming, reset + the debug stmt. + + * gcc.dg/pr49000.c: New test. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173851 138bc75d-0d04-0410-961f-82ee72b054a4 + +diff --git a/gcc/testsuite/gcc.dg/pr49000.c b/gcc/testsuite/gcc.dg/pr49000.c +new file mode 100644 +index 0000000..32a1cdb +--- /dev/null ++++ b/gcc/testsuite/gcc.dg/pr49000.c +@@ -0,0 +1,29 @@ ++/* PR tree-optimization/49000 */ ++/* { dg-do compile } */ ++/* { dg-options "-O2 -g" } */ ++ ++static ++foo (int x, int y) ++{ ++ return x * y; ++} ++ ++static int ++bar (int *z) ++{ ++ return *z; ++} ++ ++void ++baz (void) ++{ ++ int a = 42; ++ int *b = &a; ++ foo (bar (&a), 3); ++} ++ ++void ++test (void) ++{ ++ baz (); ++} +-- +1.7.0.4 + |