Clang frontend C++ crash on auto in non-static struct member #63278
Closed
Description
To quickly reproduce: https://gcc.godbolt.org/z/G79ThqzWE (assertion-trunk)
struct Tournament {
int id{0}; // remove this line and it no longer crashes
auto x = 1;
};
int main() {
Tournament s(0);
}Compiling the above code crashes clang clang++ -x c++ -std=c++20 , crashes locally using clang-17.0 (a10019a) (requires c++20 or above), also on trunk with assertion (see godbolt link)
Note that removing int id{0}; inside the struct stops the crash.
Activity