[llvm-bugs] [Bug 48671] New: c++2a constexpr destructors not supported for CUDA

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 5 15:13:05 PST 2021


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

            Bug ID: 48671
           Summary: c++2a constexpr destructors not supported for CUDA
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: CUDA
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ryan_greenblatt at brown.edu
                CC: llvm-bugs at lists.llvm.org

The following program builds under c++20 in c++ but not with CUDA:
```
struct A {
  constexpr ~A() {
     // some body is needed for the issue to occur
    ;
  }
};

constexpr A a;
```
It fails to build with "error: dynamic initialization is not supported for
__device__, __constant__, and __shared__ variables."

I think the desired behavior would be for this to be valid CUDA.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210105/ef93d1a9/attachment.html>


More information about the llvm-bugs mailing list