[Bug jit/66812] jit code-generation example that unexpectedly required -fno-strict-aliasing to work
dmalcolm at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 9 19:13:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66812
--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #2)
> Output from fre1 dump (at e.g. optlevel 3) (with TDF_DETAILS enabled) is:
(snip)
> Removing dead stmt MEM[(struct value *)arr_2(D) + 16B].union_field.i_field = 0;
I believe that this statement *isn't* dead, and that removing it is the bug.
> test_pr66812 (struct value * arr)
> {
> <L0>:
> MEM[(struct value *)arr_2(D) + 16B].union_field.i_field = 0;
> MEM[(struct value *)arr_2(D) + 16B].type_code = 0;
> MEM[(struct value *)arr_2(D) + 16B].union_field.ll_field = 10;
> MEM[(struct value *)arr_2(D) + 16B].type_code = 19;
> MEM[(struct value *)arr_2(D) + 16B].type_code = 0;
> return;
Hence ....union_field.ll_field == 10 rather than == 0.
More information about the Gcc-bugs
mailing list