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

            Bug ID: 41609
           Summary: static constexpr class members not accepted without
                    address space qualifier
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: OpenCL
          Assignee: unassignedclangb...@nondot.org
          Reporter: dr...@jwdt.org
                CC: anastasia.stul...@arm.com, llvm-bugs@lists.llvm.org

Created attachment 21824
  --> https://bugs.llvm.org/attachment.cgi?id=21824&action=edit
Demonstator for problem

I can create constexpr constants without an address space qualifier, but if I
try to create a static constexpr class members (which are essentially just
constexpr constants), clang complains:

error: program scope variable must reside in global or constant address space

The attached test case demonstates the problem.

CUDA has special treatment to allow such constexpr static members. I didn't
read something in the OpenCL spec about this, but out of convenience and
compatibility, I think it should be supported as well.

-- 
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