This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc miscompiles gcj @ -O2
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: gcc miscompiles gcj @ -O2
- From: Richard Henderson <rth at redhat dot com>
- Date: Thu, 14 Dec 2000 23:54:37 -0800
- Cc: Alexandre Petit-Bianco <apbianco at cygnus dot com>, gcc at gcc dot gnu dot org
- References: <3A396DDE.2157590@albatross.co.nz>
On Fri, Dec 15, 2000 at 02:03:26PM +1300, Bryce McKinlay wrote:
> Symptom: Return value of exit_block() does not actually get assigned
> to BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (mdecl)) when compiled with -O2
> on an ia32.
Reason: exit_block modifies DECL_FUNCTION_BODY (current_function_decl).
Therefore, if mdecl == current_function_decl, we have undefined
behaviour, since there is no sequence point across the = in
BLOCK_EXPR_BODY (DECL_FUNCTION_BODY (mdecl)) = exit_block ();
r~