[llvm-bugs] [Bug 43296] New: Add __private addr space to all temporaries

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Sep 12 06:59:00 PDT 2019


            Bug ID: 43296
           Summary: Add __private addr space to all temporaries
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenCL
          Assignee: unassignedclangbugs at nondot.org
          Reporter: anastasia.stulova at arm.com
                CC: anastasia.stulova at arm.com, llvm-bugs at lists.llvm.org

Currently temporaries are in defaul (no addr space). However since OpenCL
explicitly requests stack variables, func params and return types to be in
__private addr space it seems logical that temporaries would be put there too.

This will solve issues for this example that should be able to compile
 template<typename T> void foo(T* par1, T par2){}

  void bar(){
    int arr[10];
    foo(&arr[0], arr[0]);
error: no matching function for call to 'foo'
note: candidate template ignored: deduced conflicting types for parameter 'T'
('int' vs. 'int')

Potentially it can help solve similar issues elsewhere.

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/20190912/b5eea012/attachment.html>

More information about the llvm-bugs mailing list