http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53228

             Bug #: 53228
           Summary: [4.6/4.7/4.8 Regression] target attributes in
                    libcpp/lex.c cause illegal instructions to be used
                    elsewhere
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: major
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: rgue...@gcc.gnu.org


When building libcpp/lex.c for -march=i586 and -mtune=generic on i586-linux-gnu
generic code contains cmov* instructions which will SIGILL on

finger@mtech:~> cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 5
model           : 8
model name      : AMD-K6(tm) 3D processor
stepping        : 12
microcode       : 0x8b
cpu MHz         : 428.811
cache size      : 64 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr cx8 pge mmx syscall 3dnow k6_mtrr up
bogomips        : 857.62
clflush size    : 32
cache_alignment : 32
address sizes   : 32 bits physical, 32 bits virtual
power management:

CPUs which are perfectly fine matching -march=i586.

When you remove all target attribute annotated code from lex.c these
instructions disappear.

Thus, a compiler built for i586 does not work.

The bug persists with GCC 4.6, 4.7 and 4.8.

Reply via email to