[llvm-bugs] [Bug 27301] New: Templated global functions don't work if marked static
    via llvm-bugs 
    llvm-bugs at lists.llvm.org
       
    Fri Apr  8 15:24:53 PDT 2016
    
    
  
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: unassignedclangbugs at nondot.org
          Reporter: crtrott at sandia.gov
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160408/17a896e2/attachment-0001.html>
    
    
More information about the llvm-bugs
mailing list