Fix PR rtl-optimization/34085
Co-Authored-By: Revital Eres <eres@il.ibm.com>
From-SVN: r130435
+2007-11-26 Steven Bosscher <stevenb.gcc@gmail.com>
+ Revital Eres <eres@il.ibm.com>
+
+ PR middle-end/34085
+ * bb-reorder.c (insert_section_boundary_note): Clear
+ BLOCK_FOR_INSN in NOTE_INSN_SWITCH_TEXT_SECTIONS.
+
2007-11-26 Richard Sandiford <rsandifo@nildram.co.uk>
* config/mips/elfoabi.h (DRIVER_SELF_SPECS): Add missing comma.
{
new_note = emit_note_before (NOTE_INSN_SWITCH_TEXT_SECTIONS,
BB_HEAD (bb));
+ /* ??? This kind of note always lives between basic blocks,
+ but add_insn_before will set BLOCK_FOR_INSN anyway. */
+ BLOCK_FOR_INSN (new_note) = NULL;
break;
}
}
+2007-11-26 Steven Bosscher <stevenb.gcc@gmail.com>
+ Revital Eres <eres@il.ibm.com>
+
+ PR rtl-optimization/34085
+ * gcc.dg/tree-prof (bb-reorg.c): New test.
+
2007-11-26 Richard Sandiford <rsandifo@nildram.co.uk>
* lib/target-supports.exp (check_effective_target_mips_soft_float):
--- /dev/null
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+
+#include <string.h>
+
+#define SIZE 1000
+int t0 = 0;
+const char *t2[SIZE];
+char buf[SIZE];
+
+void
+foo (void)
+{
+ char *s = buf;
+ t0 = 1;
+
+ for (;;)
+ {
+ if (*s == '\0')
+ break;
+ else
+ {
+ t2[t0] = s;
+ t0++;
+ }
+ *s++ = '\0';
+ }
+ t2[t0] = NULL;
+}
+
+
+int
+main ()
+{
+ strcpy (buf, "hello");
+ foo ();
+ return 0;
+}
+