GCC 4.5.0 20091217. When I run `gcc -c -march=native -mfpmath=sse 1.c 2.c', it
gives a warning: `2.c:1:0: warning: SSE instruction set disabled, using 387
arithmetics'.
/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.0/cc1 -quiet 1.c -march=pentium4
--param l1-cache-size=8 --param l1-cache-line-size=64 --param l2-cache-size=512
-mtune=pentium4 -quiet -dumpbase 1.c -mfpmath=sse -auxbase 1 -o /tmp/ccwiYM9g.s
/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.0/cc1 -quiet 2.c -quiet -dumpbase
2.c -mfpmath=sse -auxbase 2 -o /tmp/ccwiYM9g.s
This is a regression.
There is also other "undocumented feature" (I see that bug 42365 has been
resolved as invalid), `gcc -c -march=i386 -march=native -mfpmath=sse 1.c'
produces a warning: `1.c:1:0: warning: SSE instruction set disabled, using 387
arithmetics'.
/usr/local/libexec/gcc/i686-pc-linux-gnu/4.5.0/cc1 -quiet 1.c -march=pentium4
--param l1-cache-size=8 --param l1-cache-line-size=64 --param l2-cache-size=512
-mtune=pentium4 -quiet -dumpbase 1.c -march=i386 -mfpmath=sse -auxbase 1 -o
/tmp/ccGVyoDg.s
-march=native is moved to the beginning, so -march=i386, though given before
it, overrides it. This can be confusing because it is not how other -march=...
options do behave.
--
Summary: Unusual behavior of -march=native option
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: d dot g dot gorbachev at gmail 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=42442