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

            Bug ID: 41674
           Summary: [C++] Initialisation of this from expression with
                    pointer type leads to an invalid bitcast
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: OpenCL
          Assignee: unassignedclangb...@nondot.org
          Reporter: kevin.pe...@arm.com
                CC: anastasia.stul...@arm.com, llvm-bugs@lists.llvm.org

When this is initialiased from an expression with a pointer type, an invalid
bitcast is produced  (it should be an addrspacecast).

The following code allows to reproduce the issue:

---------------------------------------------
struct foo {
    void init() {
        m_data = 1;
    }
private:
    int m_data;
};

kernel void test(global struct foo* afoo) {
    afoo->init();
}
---------------------------------------------

I will be submitting a patch that I believe fixes the issue.

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

Reply via email to