https://bugs.llvm.org/show_bug.cgi?id=41157
Bug ID: 41157
Summary: [C++] Incorrect generation of initializers for __local
addr space class variables in IR
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: OpenCL
Assignee: unassignedclangb...@nondot.org
Reporter: anastasia.stul...@arm.com
CC: anastasia.stul...@arm.com, llvm-bugs@lists.llvm.org
OpenCL spec s6.5.2 disallows initializers on __local addr space variables, but
even when they are not initialized in the source clang adds initializers for
the class type variables in IR.
Example:
1 class C{
2 int i;
3 };
4
5 kernel void test()
6 {
7 __local int i;
8 __local C ii;
9 }
Produces in IR:
@_ZZ4testvE1i = internal addrspace(3) global i32 undef, align 4
@_ZZ4testvE2ii = internal addrspace(3) global %class.C zeroinitializer, align 4
--
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