Make sure this testcase keeps crashing with -O3.

Recent optimization improvements made LLVM realize the store-to-null was
unavoidable, so it deleted all of main() and replaced it with 'unreachable'.
Because the body of main() no longer even contained a return instruction,
calling it caused random code to be ran instead. This happened to be the code
that links in the ModuleInfo on my machine, which then returned "successfully".
This commit is contained in:
Frits van Bommel
2009-05-09 00:55:47 +02:00
parent 5b82f780f8
commit 039edd5cd4

View File

@@ -28,6 +28,6 @@ void main()
auto ci = c.classinfo;
int* fail;
int* fail = cast(int*) 1;
*fail = 0;
}