I have build a GCC-6.1.0 cross compiler with SJLJ exceptions on Ubuntu 16.04 LTS. Using the cross compiler I build a native GCC-6.1.0 with SJLJ exceptions for Windows. The host and target for the native compiler was both configured to i686-pc-mingw32. The build for the cross compiler was set to x86_64-pc-linux-gnu. The program I tried to run: #include <iostream> using namespace std; int main() { auto lambda = [](auto x){ return x; }; cout << lambda("Hello generic lambda!\n"); return 0; } The compiler and linker on Windows work as expected, but the compiled executable crashes. I ran the code through the GDB debugger and it breaks on line 74 of the <iostream> header. This crash only happens with shared code, not the static. Below is the debugger output: Debugger name and version: GNU gdb (GDB) 7.11 Child process PID: 268 In ?? () () #1 0x004015f8 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at c:/mingw/include/c++/6.1.0/iostream:74 c:\mingw\include\c++\6.1.0\iostream:74:2582:beg:0x4015f8 At c:\mingw\include\c++\6.1.0\iostream:74 Cannot find bounds of current function Maybe I configured the cross compiler or native compiler incorrectly, because I downloaded GCC-5.3.0 with SJLJ exceptions from MinGW-w64 and compiled the above code and that executable works perfectly. Any help will be appreciated. -- View this message in context: http://gcc.1065356.n5.nabble.com/C-test-program-with-SJLJ-exception-crash-tp1263629.html Sent from the gcc - Help mailing list archive at Nabble.com.