This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78895] [6 Regression] wrong code with -O1 when setting union twice since 6.3
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Dec 2016 10:01:01 +0000
- Subject: [Bug tree-optimization/78895] [6 Regression] wrong code with -O1 when setting union twice since 6.3
- Auto-submitted: auto-generated
- References: <bug-78895-4@http.gcc.gnu.org/bugzilla/>
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.