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

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.


  1 class C{
  2 int i;
  3 };
  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

Reply via email to