This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/55816] New: Options from command line are added to target arch attribute eventhough they are in contradiction with that target
- From: "aivchenk at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Dec 2012 16:16:01 +0000
- Subject: [Bug target/55816] New: Options from command line are added to target arch attribute eventhough they are in contradiction with that target
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55816
Bug #: 55816
Summary: Options from command line are added to target arch
attribute eventhough they are in contradiction with
that target
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: aivchenk@gmail.com
CC: aivchenk@gmail.com, hjl.tools@gmail.com,
ubizjak@gmail.com
Target: i?86-*-* x86_64-*-*
On x86 android gcc we have -msse3 turned on by default, that leads
gcc/testsuite/gcc.target/i386/funcspec-10.c to fail:
extern int foo (int) __attribute__((__target__("arch=i386")));
int
foo (int x)
{
if (x < 0)
x = 1;
return x;
}
because compiler produces CMOV, eventhough foo has been declared as arch=i386.
The problem is that isa option from command line (-msse3) is added to arch=i386
within this function.
I believe that there could be other cases when that would be more critical.
Should we turn off enabled from command line isa's inside the function with
"target arch" attribute, if those isa's are in contradiction with that arch?