This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/21397] New: -march selects wrong arm_tune flags
- From: "trauscher at loytec dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 May 2005 11:01:04 -0000
- Subject: [Bug target/21397] New: -march selects wrong arm_tune flags
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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