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: [email protected]
          Reporter: [email protected]
                CC: [email protected]

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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to