Open comex opened 5 years ago
reproduced on 9.0.1 with a stack dump crash
starting from 10.0.0 and going to trunk it still segfaults, but it does so after issuing the warning "
@llvm/issue-subscribers-clang-frontend
Segfaulting without backtrace is not good, I think. CC @shafik @AaronBallman
We issue a warning about the stack exhaustion: https://godbolt.org/z/s1Kx8n8oq
but yeah, this code should not cause an infinite loop.
Extended Description
Code:
struct B; struct A { A(B b); }; struct B { attribute((enable_if(true, "xxx"))) B(A a); }; void test(A a) { B b(a); }
When compiling this, Clang crashes due to infinite recursion. Note that the enable_if is required for it to crash, even though the expression is simply 'true'.
Backtrace:
[snip...]
[repeats starting here:]