aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2006-04-27 16:43:10 +0000
committerRichard Sandiford <richard@codesourcery.com>2006-04-27 16:43:10 +0000
commit8ae59da610fc40f1eb95e6009dd1fd34c2903cbd (patch)
treeb0cef8be1869cc4ed2799350ad2a24d8c1891889
parent6bcd1437a14fa28baefb885880f31cac50d121be (diff)
PR rtl-optimization/25514
* combine.c (replaced_rhs_insn): New variable. (combine_instructions): Set replaced_rhs_insn when trying to replace a SET_SRC with a REG_EQUAL note. (distribute_notes): Use replaced_rhs_insn when determining the live range of a REG_DEAD register. gcc/testsute * gcc.c-torture/compile/pr25514.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/csl/coldfire-4_1@113313 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr25514.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25514.c b/gcc/testsuite/gcc.c-torture/compile/pr25514.c
new file mode 100644
index 00000000000..0bf5aa9077d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr25514.c
@@ -0,0 +1,24 @@
+struct node {
+ struct node *next;
+ int value;
+};
+
+struct node *current_node, global_list;
+
+void
+bar (void)
+{
+ struct node *node, *next;
+
+ node = current_node;
+ next = node->next;
+ if (node != &global_list)
+ current_node = next;
+ else
+ {
+ node = global_list.next;
+ global_list.value = node->value;
+ global_list.next = node->next;
+ }
+ foo (node);
+}