gcc miscompiles gcj @ -O2
Richard Henderson
rth@redhat.com
Thu Dec 14 23:54:00 GMT 2000
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~
More information about the Gcc
mailing list