This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/21847] [4.0/4.1 Regression] misscompiling of the following java code
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2005 23:10:26 -0000
- Subject: [Bug tree-optimization/21847] [4.0/4.1 Regression] misscompiling of the following java code
- References: <20050531193756.21847.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2005-06-05 23:10 -------
Compiling the test case on i686 -O with today's CVS, I get the following
final_cleanup dump:
;; Function t.main(java.lang.String[])
(_ZN1t4mainEP6JArrayIPN4java4lang6StringEE)
t.main(java.lang.String[]) (a1D.407)
Eh tree:
2 catch tree_label:<L0>
1 try
{
struct * out.3D.749;
struct * out.1D.741;
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
_Jv_InitClass (&t.classD.726);
test ();
goto <bb 2> (<L3>);
# SUCC: 1 (ab,eh,exec) 2 [100.0%] (fallthru,exec)
# BLOCK 1
# PRED: 0 (ab,eh,exec)
<L0>:;
_Jv_InitClass (&java.lang.System.classD.725);
out.1D.741 = outD.629;
*(((struct *) out.1)->vtable + 120B) (out.1D.741, (struct *) _CD_tD.617
[1]);
goto <bb 3> (<L6>);
# SUCC: 3 [100.0%] (fallthru,exec)
# BLOCK 2
# PRED: 0 [100.0%] (fallthru,exec)
<L3>:;
_Jv_InitClass (&java.lang.System.classD.725);
out.3D.749 = outD.629;
*(((struct *) out.3)->vtable + 120B) (out.3D.749, (struct *) _CD_tD.617
[2]);
# SUCC: 3 [100.0%] (fallthru,exec)
# BLOCK 3
# PRED: 1 [100.0%] (fallthru,exec) 2 [100.0%] (fallthru,exec)
<L6>:;
return;
# SUCC: EXIT [100.0%]
}
When I disable DCE with -fno-tree-dce, I get:
;; Function t.main(java.lang.String[])
(_ZN1t4mainEP6JArrayIPN4java4lang6StringEE)
t.main(java.lang.String[]) (a1D.407)
Eh tree:
2 catch tree_label:<L0>
1 try
{
booleanD.10 temp.9D.799;
booleanD.10 temp.8D.798;
booleanD.10 temp.7D.797;
struct * eD.408;
booleanD.10 D.724;
struct * out.4D.750;
struct * out.2D.742;
booleanD.10 D.741;
voidD.8 * * D.738;
# BLOCK 0
# PRED: ENTRY [100.0%] (fallthru,exec)
_Jv_InitClass (&t.classD.726);
D.741 = 0;
test ();
goto <bb 2> (<L3>);
# SUCC: 1 (ab,eh,exec) 2 [100.0%] (fallthru,exec)
# BLOCK 1
# PRED: 0 (ab,eh,exec)
<L0>:;
D.738 = <<<exception object>>>;
eD.408 = *(D.738 - 4);
temp.9D.799 = 0;
_Jv_InitClass (&java.lang.System.classD.725);
temp.7D.797 = 1;
out.2D.742 = outD.629;
*(((struct *) out.2)->vtable + 120B) (out.2D.742, (struct *) _CD_tD.617
[1]);
goto <bb 3> (<L6>);
# SUCC: 3 [100.0%] (fallthru,exec)
# BLOCK 2
# PRED: 0 [100.0%] (fallthru,exec)
<L3>:;
temp.8D.798 = 0;
_Jv_InitClass (&java.lang.System.classD.725);
D.724 = 1;
out.4D.750 = outD.629;
*(((struct *) out.4)->vtable + 120B) (out.4D.750, (struct *) _CD_tD.617
[2]);
# SUCC: 3 [100.0%] (fallthru,exec)
# BLOCK 3
# PRED: 1 [100.0%] (fallthru,exec) 2 [100.0%] (fallthru,exec)
<L6>:;
return;
# SUCC: EXIT [100.0%]
}
With DCE enabled (compiled with gcj --main=t -O) the test case fails, but if
DCE is disabeld (gcj --main=t -O -fno-tree-dce) the test case passes...
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-06-05 23:10:25
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21847