+2011-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/48141
+ * dse.c (record_store): If no positions are needed in an insn
+ that cannot be deleted, at least unchain it from active_local_stores.
+
2011-03-16 Dodji Seketeli <dodji@redhat.com>
PR debug/47510
/* RTL dead store elimination.
- Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+ Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Richard Sandiford <rsandifor@codesourcery.com>
/* An insn can be deleted if every position of every one of
its s_infos is zero. */
- if (any_positions_needed_p (s_info)
- || ptr->cannot_delete)
+ if (any_positions_needed_p (s_info))
del = false;
if (del)
else
active_local_stores = ptr->next_local_store;
- delete_dead_store_insn (insn_to_delete);
+ if (!insn_to_delete->cannot_delete)
+ delete_dead_store_insn (insn_to_delete);
}
else
last = ptr;
+2011-03-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/48141
+ * gcc.dg/pr48141.c: New test.
+
2011-03-16 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/constexpr-48089.C: New.
--- /dev/null
+/* PR rtl-optimization/48141 */
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+#define A i = 0;
+#define B A A A A A A A A A A
+#define C B B B B B B B B B B
+#define D C C C C C C C C C C
+#define E D D D D D D D D D D
+
+int
+foo (void)
+{
+ volatile int i = 0;
+ E E E E E E E E E E E
+ return 0;
+}