Commit b8111d54 by Steven Bosscher Committed by Revital Eres

re PR rtl-optimization/34085 (ICE with -freorder-blocks-and-partition)

Fix PR rtl-optimization/34085

Co-Authored-By: Revital Eres <eres@il.ibm.com>

From-SVN: r130435
parent 128d8f68
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.
......@@ -1947,6 +1947,9 @@ insert_section_boundary_note (void)
{
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):
/* { 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;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment