For the attached C/C++ source, illegal code is produced when -O3 is used. One source statement is omitted. This statement is marked by /** ERROR: no code will be generated for the following statement **/ in the source code.
The issue can be seen on different platforms, so it seems to be in the RTL optimization part and independent of the backend. I tried on x86 x86_64 and SPARC. Call "make ok" to get the OK version, "make bug" to get the buggy one. The driver built around the source prints "ok" or "error" respectively. As this is a genereted bison source, it is rather huge, any attempts to make it smaller failed. -- Summary: Wrong code on -O3 Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dominik dot strasser at onespin-solutions dot com 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=34902