gcc 4.1.1 generates incorrect 386 code with -O2 or -O3 flag for an inlined function if the -mtune cpu-type is one of: generic, i586, i686, pentium2, pentium3, pentium-m. The generated code seems to be correct for the following cpu-types: i386, i486, pentium4 & prescott. The problem is also present in gcc version 3.4.4 (cygming special).
-- Summary: Incorrect i386 code for inlined function with -O2 - mtune=generic Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: chiabaut at nortel dot com GCC host triplet: i386-redhat-linux GCC target triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28792