This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: java/1159
- To: apbianco at gcc dot gnu dot org
- Subject: Re: java/1159
- From: green at gcc dot gnu dot org
- Date: 23 Dec 2000 20:16:00 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: green at gcc dot gnu dot org
The following reply was made to PR java/1159; it has been noted by GNATS.
From: green@gcc.gnu.org
To: apbianco@gcc.gnu.org, bryce@albatross.co.nz, gcc-gnats@gcc.gnu.org
Cc:
Subject: Re: java/1159
Date: 23 Dec 2000 20:09:32 -0000
Synopsis: Source parser miscompiles loops when using "-O"
State-Changed-From-To: open->analyzed
State-Changed-By: green
State-Changed-When: Sat Dec 23 12:09:32 2000
State-Changed-Why:
You can work around this bug by compiling with -fno-defer-pop.
The defer-pop docs say:
Always pop the arguments to each function call as soon as that function
returns. For machines which must pop arguments after a function call,
the compiler normally lets arguments accumulate on the stack for several
function calls and pops them all at once.
Compare "gcj -O0 -fdefer-pops -S Loop.java" with
"gcj -O0 -fno-defer-pops -S Loop.java".
If you look at the asm code for the method calls within
our loop, you'll see that we're popping the stack twice (once after each function call, and the second time at the end of the loop)!
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1159&database=gcc