Compiling a program with -fstack-check is supposed to add code to check for stack overflow. This does not happen with llvm-gcc. I've filed this option under tools/gnat because in mainline this option only works with the Ada front-end. However patches to mainline have been proposed that generalize this functionality to all languages. It seems like a useful feature for LLVM to support.
Is this related to the -fstack-protector option? I thought 4.2 had some support for stack canaries.
It's not related to -fstack-protector: that's trying to prevent people from overwriting your stack. -fstack-check is about checking that (via recursion or whatever) you do not make the stack so big that it runs into the heap or some other bad place. Ada doesn't really have a buffer overflow problem since the compiler is required to insert code to check that there are no out of range accesses, so -fstack-protector isn't really useful for it. However stack overflow is a potential problem.
ah, ok!
This is the reason for the ACATS test c52104y failing.
Are there any plans to ever fix this bug? It seems that even in the latest version of clang the option "-fstack-check" has no effect on the generated code. At least a test case, that should definitely crash if stack checking was supported (and it does crash on Darwin, when building with GCC), does not crash if compiled with clang.