When using -march, wrong tuning flags are selected. E.g., -march=armv4t selects 'tune_flags' for arm600, instead of arm7tdmi (or similar). The error is in arm_override_options().
When "-march" is given, (sel - all_architectures) is calculated. In contrast, "-mcpu" calculates (sel - all_cores). This array index is stored in 'arm_tune' (arm.c:791) In arm.c:909 tune_flags are always taken from all_cores so that the calculated index references the wrong array when using "-march" tune_flags = all_cores[(int)arm_tune].flags; -- Summary: -march selects wrong arm_tune flags Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: trauscher at loytec dot com CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i386-linux GCC target triplet: arm-*-elf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21397