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 c++/81355] New: SegFault when using attribute target dispatch with empty parameter


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81355

            Bug ID: 81355
           Summary: SegFault when using attribute target dispatch with
                    empty parameter
           Product: gcc
           Version: 7.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: erich.keane at intel dot com
  Target Milestone: ---

This very simple repro causes a segfault:
__attribute__((target("default")))
int foo() {return 99;}
__attribute__((target("sse4.2","")))
int foo() {return 1;}

int main() {
    return foo();
}

As you can see, this does dispatch, and should otherwise be valid.  However,
the blank string causes a segfault: https://godbolt.org/g/dmuCaZ

Additionally of interest, ONLY the 1st parameter to target participates in
dispatch.

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