------- 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