[Bug tree-optimization/78895] [6 Regression] wrong code with -O1 when setting union twice since 6.3
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 22 10:01:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78895
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-12-22
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |6.4
Summary|[6 regression] wrong code |[6 Regression] wrong code
|with -O1 when setting union |with -O1 when setting union
|twice since 6.3 |twice since 6.3
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
union U { int i; _Bool b; };
void __attribute__((noinline, noclone))
foo (union U u)
{
if (u.b)
__builtin_abort ();
}
int
main ()
{
union U u;
u.i = 10;
u.b = 0;
foo (u);
return 0;
}
It is fre1 that removes the u.b = 0; store. Doesn't fail on the trunk, testing
now if it ever failed on trunk this fall.
More information about the Gcc-bugs
mailing list