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.

Reply via email to