[llvm-bugs] [Bug 50329] New: [C++4OpenCL] Constructor address space overloading not prioritizing specific address spaces

via llvm-bugs llvm-bugs at lists.llvm.org
Thu May 13 07:07:15 PDT 2021


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

            Bug ID: 50329
           Summary: [C++4OpenCL] Constructor address space overloading not
                    prioritizing specific address spaces
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: OpenCL
          Assignee: unassignedclangbugs at nondot.org
          Reporter: olemarius.strohm at arm.com
                CC: anastasia.stulova at arm.com, llvm-bugs at lists.llvm.org

struct Foo {
    int x;

    Foo() __generic = default;
    Foo() __private = default;
};

kernel void k() {
    __private Foo f;
}

https://godbolt.org/z/nGrdPacWY

This gives the error: call to constructor of '__private Foo' is ambiguous

But since __private is more specific than __generic this should choose Foo()
__private as it is the most specific constructor, rather than consider them
equally specific.

-- 
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/20210513/ff1e7e26/attachment.html>


More information about the llvm-bugs mailing list