+2007-07-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/32450
+ * function.c (thread_prologue_and_epilogue_insns): Emit blockage insn
+ to ensure that instructions are not moved into the prologue when
+ profiling is on.
+
2007-07-04 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/31966
/* Retain a map of the prologue insns. */
record_insns (seq, &prologue);
prologue_end = emit_note (NOTE_INSN_PROLOGUE_END);
+
+#ifndef PROFILE_BEFORE_PROLOGUE
+ /* Ensure that instructions are not moved into the prologue when
+ profiling is on. The call to the profiling routine can be
+ emitted within the live range of a call-clobbered register. */
+ if (current_function_profile)
+ emit_insn (gen_rtx_ASM_INPUT (VOIDmode, ""));
+#endif
seq = get_insns ();
end_sequence ();
+2007-07-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/32450
+ * gcc.dg/pr32450.c: New runtime test.
+
2007-07-04 Uros Bizjak <ubizjak@gmail.com>
PR tree-optimization/31966
--- /dev/null
+/* Contributed by Joost VandeVondele <jv244@cam.ac.uk> */
+
+/* { dg-do run } */
+/* { dg-require-profiling "-pg" } */
+/* { dg-options "-O2 -pg" } */
+/* { dg-options "-O2 -pg -static" { target hppa*-*-hpux* } } */
+
+extern void abort (void);
+
+int stack_pointer;
+
+void
+__attribute__((noinline))
+mystop ()
+{
+ abort ();
+}
+
+void
+__attribute__((noinline))
+add ()
+{
+ if (stack_pointer + 1 > 10)
+ mystop ();
+
+ stack_pointer = stack_pointer + 1;
+}
+
+int main ()
+{
+ add ();
+ return stack_pointer - 1;
+}