[Bug c++/33887] Reference to bitfield gets wrong value when optimizing

2007-10-25 Thread ian at airs dot com
--- Comment #4 from ian at airs dot com 2007-10-25 13:25 --- Yes, of course it should sign extend. This is a wrong-code bug. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33887

[Bug c++/33887] Reference to bitfield gets wrong value when optimizing

2007-10-24 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2007-10-25 05:21 --- int f2 = sv.f2; That should sign extend as far as I know. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33887

[Bug c++/33887] Reference to bitfield gets wrong value when optimizing

2007-10-24 Thread ian at airs dot com
--- Comment #2 from ian at airs dot com 2007-10-25 05:07 --- Nothing is taking the address of a bitfield. It's a const reference, which should get initialized with the value. If the reference is not const, then the compiler gives an error. In any case, this code fails the same way, an

[Bug c++/33887] Reference to bitfield gets wrong value when optimizing

2007-10-24 Thread pinskia at gcc dot gnu dot org
--- Comment #1 from pinskia at gcc dot gnu dot org 2007-10-24 23:51 --- As far as I know this code is invlaid as you should not able take the address of the bitfield. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33887