------- Additional Comments From jakub at gcc dot gnu dot org 2005-04-12 18:01 ------- For those who want a quick workaround, changing khtmllayout.h to: - Length(LengthType t) { l.value = 0; l.type = t; l.quirk = 0; } + Length(LengthType t) { _length = 0; l.type = t; } Length(int v, LengthType t, bool q=false) - { l.value = v; l.type = t; l.quirk = q; } + { _length = 0; l.value = v; l.type = t; l.quirk = q; }
makes the bug go away. The first changed line actually might result in better generated code with the current GCC's deficiencies in bitfield handling. I guess we need a bitfield optimization pass near the end of tree passes that will figure out bitfield accesses to the same underlying field and change that into arithmetics on a union or something. Don't even look at assembly for that RTL optimizers can't figure out, but a tree optimizer could turn that into 2 instructions: struct { int a:2,b:2,c:2,d:2,e:2,f:2,g:2,h:2,i:2,j:2,k:2,l:2,m:2,n:2;} s; void foo (void) { s.a |= 1; s.b &= 1; s.c |= 1; s.d &= 1; s.e |= 1; s.f &= 1; s.g |= 1; s.h &= 1; s.i |= 1; s.j &= 1; s.k |= 1; s.l &= 1; s.m |= 1; s.n &= 1; } -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed| |1 Last reconfirmed|0000-00-00 00:00:00 |2005-04-12 18:01:07 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20973