This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33819] [4.2/4.3 Regression] Miscompiled shift of C++ bitfield
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Dec 2007 19:59:41 -0000
- Subject: [Bug c++/33819] [4.2/4.3 Regression] Miscompiled shift of C++ bitfield
- References: <bug-33819-1313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-12-08 19:59 -------
Yes it is done in the 48bit type:
D.2022 = this->a;
D.2023 = D.2022 << 16;
D.2024 = D.2023 >> 16;
D.2021 = (long long int) D.2024;
But the good question why does it work at -O0. We have the same IR for both
-O0 and -O1. Is it because the middle-end expands shifts incorrectly for
partial types still?
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2007-12-08 19:59:41
date| |
Summary|Miscompiled shift of C++ |[4.2/4.3 Regression]
|bitfield |Miscompiled shift of C++
| |bitfield
Target Milestone|--- |4.2.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33819