From b5b84a7f46e8baead0f3d7b62d59659d83d67271 Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Wed, 6 Sep 2006 21:24:24 -0700 Subject: [PATCH] [multiple changes] 2006-09-06 James E Wilson PR rtl-opt/27883 * flow.c (update_life_info): If UPDATE_LIFE_LOCAL and PROP_DEATH_NOTES then call count_or_remove_death_notes. 2006-09-06 Andrew Pinski PR rtl-opt/27883 * g++.dg/opt/copysign-1.C: New test. From-SVN: r116739 --- gcc/ChangeLog | 6 ++++++ gcc/flow.c | 11 +++++++++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/opt/copysign-1.C | 10 ++++++++++ 4 files changed, 32 insertions(+) create mode 100644 gcc/testsuite/g++.dg/opt/copysign-1.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dd1101499a5..580bf89d685 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-09-06 James E Wilson + + PR rtl-opt/27883 + * flow.c (update_life_info): If UPDATE_LIFE_LOCAL and PROP_DEATH_NOTES + then call count_or_remove_death_notes. + 2006-09-06 Jason Merrill PR c++/27371 diff --git a/gcc/flow.c b/gcc/flow.c index 1adba717e16..47e49f484e7 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -647,6 +647,17 @@ update_life_info (sbitmap blocks, enum update_life_extent extent, count_or_remove_death_notes (blocks, prop_flags & PROP_POST_REGSTACK ? -1 : 1); } + else + { + /* FIXME: This can go when the dataflow branch has been merged in. */ + /* For a local update, if we are creating new REG_DEAD notes, then we + must delete the old ones first to avoid conflicts if they are + different. */ + if (prop_flags & PROP_DEATH_NOTES) + count_or_remove_death_notes (blocks, + prop_flags & PROP_POST_REGSTACK ? -1 : 1); + } + /* Clear log links in case we are asked to (re)compute them. */ if (prop_flags & PROP_LOG_LINKS) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6e7bd99eee7..0e052be2e7d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-09-06 Andrew Pinski + + PR rtl-opt/27883 + * g++.dg/opt/copysign-1.C: New test. + 2006-09-06 Mark Mitchell PR c++/28903 diff --git a/gcc/testsuite/g++.dg/opt/copysign-1.C b/gcc/testsuite/g++.dg/opt/copysign-1.C new file mode 100644 index 00000000000..347bec26e7d --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/copysign-1.C @@ -0,0 +1,10 @@ +// { dg-options "-O2" } +// { dg-do compile } +// PR rtl-opt/27883 +// MIPS used to ICE because local flow update +// was not removing an invalid REG_DEAD. + + +double copysign (double x, double y); +double GetDouble(); +double a = copysign (1.0, GetDouble()); -- 2.11.4.GIT