https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126856

--- Comment #3 from Andrew Macleod <amacleod at redhat dot com> ---
(In reply to Drea Pinski from comment #1)
> Confirmed.
> 
> What is happening is we have:
>   exp.0_1 = (unsigned int) exp_8(D);
> 
> Which gets recorded as:
> Folding statement: exp.0_1 = (unsigned int) exp_8(D);
>  Registering value_relation (exp.0_1 pe32 exp_8(D)) (bb2) at exp.0_1 =
> (unsigned int) exp_8(D);
> 
> 
> and then when the simple_dce happens we change the assignment to exp.0_1 to:
> 
> exp.0_1 = 0;
> 
> And then we look at:
> Folding statement: _5 = (short unsigned int) exp_8(D);
>  Registering value_relation (_5 pe16 exp_8(D)) (bb6) at _5 = (short unsigned
> int) exp_8(D);
> Queued stmt for removal.  Folds to: 0
> 
> Which is wrong.
> 
> So this is caused by r17-3204-ge02ce3b8c4574c.
> 
> Let me try to get a testcase without unions and fp.

Nice analysis.  ugg.  Thats not pretty.  I need to sleep on that one.

Reply via email to