mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
re PR rtl-optimization/16590 (Incorrect execution when compiling with -O2)
PR rtl-optimization/16590 * gcse.c (pre_delete): Do not create invalid REG_EQUAL notes. PR rtl-optimization/16590 * g++.dg/opt/loop1.C: New test. From-SVN: r86732
This commit is contained in:
parent
477a21f7f9
commit
5e9f78cc74
@ -1,3 +1,8 @@
|
||||
2004-08-29 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR rtl-optimization/16590
|
||||
* gcse.c (pre_delete): Do not create invalid REG_EQUAL notes.
|
||||
|
||||
2004-08-29 Diego Novillo <dnovillo@redhat.com>
|
||||
|
||||
* tree-ssa-ccp.c (ccp_visit_stmt): Remove #if 0 guards.
|
||||
|
@ -4463,7 +4463,9 @@ pre_delete (void)
|
||||
expr->reaching_reg
|
||||
= gen_reg_rtx (GET_MODE (SET_DEST (set)));
|
||||
|
||||
gcse_emit_move_after (expr->reaching_reg, SET_DEST (set), insn);
|
||||
emit_insn_after (gen_move_insn (SET_DEST (set),
|
||||
expr->reaching_reg),
|
||||
insn);
|
||||
delete_insn (insn);
|
||||
occr->deleted_p = 1;
|
||||
SET_BIT (pre_redundant_insns, INSN_CUID (insn));
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-08-29 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR rtl-optimization/16590
|
||||
* g++.dg/opt/loop1.C: New test.
|
||||
|
||||
2004-08-29 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
PR fortran/13910
|
||||
|
24
gcc/testsuite/g++.dg/opt/loop1.C
Normal file
24
gcc/testsuite/g++.dg/opt/loop1.C
Normal file
@ -0,0 +1,24 @@
|
||||
// PR rtl-optimization/16590
|
||||
// { dg-do run }
|
||||
// { dg-options "-O2" }
|
||||
|
||||
extern "C" void abort();
|
||||
|
||||
struct iterator {
|
||||
char * p;
|
||||
int *dummy;
|
||||
};
|
||||
|
||||
static iterator pend(char * start) {
|
||||
iterator p = {start, 0};
|
||||
if (p.p == start) p.p = start+5;
|
||||
--p.p;
|
||||
return p;
|
||||
}
|
||||
|
||||
int main() {
|
||||
char mem[4+1];
|
||||
|
||||
if(pend(mem).p != mem+4)
|
||||
abort ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user