https://bugs.llvm.org/show_bug.cgi?id=41613

            Bug ID: 41613
           Summary: Function multiversioning doesn't support function
                    templates
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

Created attachment 21825
  --> https://bugs.llvm.org/attachment.cgi?id=21825&action=edit
Templated function multiversioning

Hey,

Function multiversioning doesn't seem to support function templates. AFAIK
there was some discussion about it where function templates were left out of
the implementation as it didn't work in gcc back then:
https://reviews.llvm.org/D51650

The example code attached fails to compile with:

clang++ test.cpp 
test.cpp:7:39: error: attribute 'target' multiversioned functions do not yet
      support function templates
__attribute__ ((target("default"))) T foo(T num) {
                                      ^

To be fair, GCC still doesn't do that (yet) but I have opened a bug report over
there as well: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90260

Are there plans to support this?

Cheers,

Nick

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to