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.

Reply via email to