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

            Bug ID: 27301
           Summary: Templated global functions don't work if marked static
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: CUDA
          Assignee: unassignedclangb...@nondot.org
          Reporter: crtr...@sandia.gov
                CC: llvm-bugs@lists.llvm.org
    Classification: Unclassified

Created attachment 16196
  --> https://llvm.org/bugs/attachment.cgi?id=16196&action=edit
Reproducer

When marking a __global__ function as static if it is also templated the code
errors out with invalid device function. Simplified example:

template<typename Scalar>
__global__
static void foo(Scalar i) {
}

doesn't work. A reproducer is attached. Again change the path names in the
build_clang script. Works with nvcc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to