[Bug tree-optimization/17468] [4.0 regression] Java garbage collector miscompiled at -O1 and higher
rth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Sep 14 07:20:00 GMT 2004
------- Additional Comments From rth at gcc dot gnu dot org 2004-09-14 07:20 -------
>From the .26.tailc dump, it's obvious that the two stmts are just reversed.
<retval>_4 = D.1138_1;
acc_tmp.5_29 = add_acc.2_23 + acc_tmp.4_28;
acc_tmp.4_28 = mult_acc.1_22 * <retval>_4;
return acc_tmp.5_29;
But there's a second more subtle bug in that we should be generating
acc_tmp.4_28 = mult_acc.1_22 * D.1138_1;
acc_tmp.5_29 = add_acc.2_23 + acc_tmp.4_28;
<retval>_4 = acc_tmp.5_29
return <retval>_4;
The trick here is that <retval> will have DECL_RTL as a hard register.
We cannot legitimately extend its lifetime at all. This is not normally
a problem, given how we generate trees.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17468
More information about the Gcc-bugs
mailing list