This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33887] [4.2/4.3 Regression] Reference to bitfield gets wrong value when optimizing
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Dec 2007 13:08:27 -0000
- Subject: [Bug c++/33887] [4.2/4.3 Regression] Reference to bitfield gets wrong value when optimizing
- References: <bug-33887-1313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from rguenth at gcc dot gnu dot org 2007-12-11 13:08 -------
Which is because
if (lang_hooks.reduce_bit_field_operations
&& TREE_CODE (type) == INTEGER_TYPE
&& GET_MODE_PRECISION (mode) > TYPE_PRECISION (type))
{
/* An operation in what may be a bit-field type needs the
result to be reduced to the precision of the bit-field type,
which is narrower than that of the type's mode. */
reduce_bit_field = true;
if (modifier == EXPAND_STACK_PARM)
target = 0;
}
so this becomes a frontend bug again, because none but c-objc-common.h sets
that langhook to true.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33887