On Friday, 2 September 2016 at 22:12:20 UTC, Walter Bright wrote:
Compiling with -v will usually show how far the compiler got.
It's curious that this topic should come up now – just a couple of days ago, I thought about adding better user reporting for LDC ICEs.
What I was planning to do is to keep a global stack of locations (and symbols where applicable, to be able to print the name) that is updated as the AST is traversed during semantic and glue layer. This should be very cheap to do, especially since the information does not need to be perfect.
You can then install a custom assert/segfault handler to print that information to aid users in reducing a test case or working around the problem, even for hard crashes or ICEs. The location information needs to be just close enough that the user knows where to start looking if the error appears after a compiler upgrade or when writing template-heavy code.
— David
