This report is similiar to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30976 , http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29473 and http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29493
Problem is that the bogus "rep ret" is still being generated, but it is accepted by assembler now. As shown in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30976 , the behaviour of "rep retn" is undefined. Testcase: --------------- struct o { virtual void a() { } }; int main(int,char**) { new o(); return 0; } ---------------- Fails under i386 with this command line: g++ main.cpp -o main.o -O1 -fomit-frame-pointer gcc 3.4.6, 4.1.2: working march: i386 i486 i586 i686 broken march: athlon k8 gcc 4.2.4, 4.3.2, 4.4.0-alpha20081226: working march: i386 i486 i586 broken march: i686 athlon k8 Fails under x86_64 with this command line: g++ main.cpp -o main.o -O1 g++ main.cpp -o main.o -O1 -m32 -fomit-frame-pointer The wrongly compiled function is o::a() -- Summary: generating non-conforming "rep retn" Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38787