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: unassig...@gcc.gnu.org

        ReportedBy: aivch...@gmail.com

                CC: aivch...@gmail.com, hjl.to...@gmail.com,

                    ubiz...@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?

Reply via email to