https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126856
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Summary|[17 Regression] mpfr and |[17 Regression] mpfr and
|mpc started failing tests |mpc started failing tests
|recently |recently since r17-3204
CC| |pinskia at gcc dot gnu.org
Last reconfirmed| |2026-08-13
--- Comment #1 from Drea Pinski <pinskia at gcc dot gnu.org> ---
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.