tbaederr wrote:
That fixes compile-time computation, but this example still breaks in codegen:
```c++
#include <array>
using namespace std;
constexpr size_t kMemoryChunk = 1024 * 8;
constexpr size_t kNumberOfIterations = 2000000;
constexpr size_t kThreadsNumber = 2 * kMemoryChunk;
struct S {};
int main() {
array<S, kThreadsNumber * kNumberOfIterations> futures{};
}
```
here:
https://github.com/llvm/llvm-project/blob/dad316275689c8ff9b3051c98a842d0bb1226368/clang/lib/CodeGen/CGExprConstant.cpp#L1408-L1412
because `NumElements` is `32768000000`.
https://github.com/llvm/llvm-project/pull/138673
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits