This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/32901] [4.1/4.2/4.3 regression] bitfield constants with multiple bitfields take up space in .data



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]