This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/52244] [4.5/4.6/4.7 Regression] wrong code for function returning union between int and _Bool at O > 2, with no-early-inlining
- 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: Tue, 14 Feb 2012 10:51:53 +0000
- Subject: [Bug middle-end/52244] [4.5/4.6/4.7 Regression] wrong code for function returning union between int and _Bool at O > 2, with no-early-inlining
- Auto-submitted: auto-generated
- References: <bug-52244-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52244
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |jamborm at gcc dot gnu.org
Target Milestone|--- |4.5.4
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 10:51:53 UTC ---
Confirmed, testcase for x86_64-linux:
extern void abort (void);
union U { _Bool b; unsigned char c; };
union U
bar (void)
{
union U u;
u.c = 0xaa;
return u;
}
union U __attribute__ ((noinline))
foo (void)
{
union U u;
u.b = 1;
u = bar ();
return u;
}
int
main ()
{
union U u = foo ();
if (u.c != 0xaa)
abort ();
return 0;
}
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147980