gcc generates wrong code command line: gcc -O2 works on: 3.4.4, 4.1.0-20050819 wrong code on: 4.0.1, 4.0.2-20050818
I am just guessing at the priority + severity levels. Test program attached. It can be compiled and run standalone -- it succeeds normally, and aborts if wrong-code is generated. The wrong code is for the source line: if (_v3 != _v4) Where _v3 and _v4 are "const bool &". -- Summary: wrong code with boolean refs, -O2 Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: critical Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mec at google dot com CC: dank at kegel dot com,gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23512