This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/33572] [4.3 Regression] wrong code with -O
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Sep 2007 12:41:03 -0000
- Subject: [Bug tree-optimization/33572] [4.3 Regression] wrong code with -O
- References: <bug-33572-8535@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from rguenth at gcc dot gnu dot org 2007-09-30 12:41 -------
Diego, we seem to have a general problem with the incremental SSA updater.
If we rename foo$ptr in
<bb 6>:
# foo$ptr_16 = PHI <foo$ptr_18(ab)(5), D.1758_3(4)>
p_12 = foo$ptr_16;
foo$ptr_19(ab) = 0B;
p_15 = foo$ptr_16;
p_4 = foo$ptr_16;
p_5 = foo$ptr_16;
D.1781_6 = foo$ptr_16->_vptr.Foo;
D.1782_7 = *D.1781_6;
OBJ_TYPE_REF(D.1782_7;foo$ptr_16->0) (foo$ptr_16);
goto <bb 8>;
it apperantly does not deal correctly with the lifetimes of foo$ptr_16 and
foo$ptr_19(ab) overlapping. Note that the SSA_NAME_OCCURS_IN_ABNORMAL_PHI
flags are correct, foo$ptr_16 does not live across an EH edge (but just
local in BB 6). Still, for this flag to prevent creating overlapping life
ranges it would have need to be set on foo$ptr_16 as well.
[In the testcase the final inliner is the first one to cause renaming of
foo$ptr, the early SRA pass introduces the life-range overlap (but hidden
by a copy chain) and the first copyprop makes it obviously visible (that's
the dump from above)]
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33572