This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33887] [4.1/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: 15 Jan 2008 09:45:54 -0000
- Subject: [Bug c++/33887] [4.1/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 #23 from rguenth at gcc dot gnu dot org 2008-01-15 09:45 -------
I don't see where there is a problem with widening conversions. The problem is
we re-use the (unsigned : 24) i; value for the comparison, which looks
reasonable, but this _narrowing_ conversion is not reflected by actual code
in expand.
I believe the only way without touching expand too much is to make the frontend
more explicit (and of course generate code for widening/narrowing conversions).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33887