http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46598
Summary: [4.5/4.6 Regression] Miscompiles computed goto
Product: gcc
Version: 4.5.1
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: [email protected]
ReportedBy: [email protected]
Target: x86_64-*-*
Created attachment 22481
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22481
testcase
GCC 4.5.1 and trunk miscompile the attached testcase which segfaults with
-O2 -fno-inline but on the 4.5 branch works with -fno-gcse. If the
collect_ndrand is annotated with optimize(0) the testcase works reliably.
The testcase uses computed gotos in a funny way.
4.4.4 works ok with -O2.