This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/54344] New: Issue with multiple "arch=" function attributes.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54344

             Bug #: 54344
           Summary: Issue with multiple "arch=" function attributes.
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: einar.sjurso+gnu@gmail.com


#include <stdio.h>
#include <stdarg.h>

int __attribute__ ((__target__ ("arch=corei7-avx", "tune=corei7-avx")))
printf_avx(const char *restrict format, ...)
{
        va_list ap;
        va_start(ap, format);
        const int ret = vfprintf(stdout, format, ap);
        va_end(ap);
        return ret;
}

int __attribute__ ((__target__ ("arch=atom", "tune=atom"))) printf_noavx(const
char *restrict format, ...)
{
        va_list ap;
        va_start(ap, format);
        const int ret = vfprintf(stdout, format, ap);
        va_end(ap);
        return ret;
}

Given this silly example, vmovaps will ge generated in printf_noavx.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]