diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/bb-reorder.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c | 39 |
4 files changed, 55 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a09dfff..4a6466c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +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. diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 0b70771..e997dc6 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -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; } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f703706..cb45e6e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +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): diff --git a/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c b/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c new file mode 100644 index 0000000..f850c9b --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-prof/bb-reorg.c @@ -0,0 +1,39 @@ +/* { 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; +} + |