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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to