This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32901] [4.1/4.2/4.3 regression] bitfield constants with multiple bitfields take up space in .data
- From: "aldyh at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 Dec 2007 23:43:25 -0000
- Subject: [Bug tree-optimization/32901] [4.1/4.2/4.3 regression] bitfield constants with multiple bitfields take up space in .data
- References: <bug-32901-11199@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from aldyh at gcc dot gnu dot org 2007-12-04 23:43 -------
TER would never see the consecutive initializations because the code I pointed
out in gimplify_init_constructor() keeps the gimplifier from splitting up the
constructor into consecutive MODIFY_EXPRs.
After gimplification we end up with:
setup_foo ()
{
static const struct foo init = {.a1=1, .a2=5};
thefoo = init;
}
So there's nothing to merge back.
What I'm suggesting *is* splitting this up, so subsequent passes can take a
stab at it. In this case, combine cleans it up.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32901