I think I found a bug with the Visual C++ optimizer or some combination of the compiler and OpenMP runtime. The attached program when compiled with OpenMP enabled crashes inside compiler generated OpenMP prologue code?
I've ran several tests and have found this problem only happens when building for 32bit & with optimizations on (not sure which, but it doesn't take a lot of optimizations to break). Disabling optimizations or building for 64bit gets around this problem, but I need the code to work for both 32b & 64b.
Please tell me what the problem is and how long it will take to fix. Thanks.