Steps to reproduce:
- Create source file a.c
int bar();
void do_finalize();
int foo() {
__try {
while(1) {
if (bar() == 42)
break;
}
} __finally {
do_finalize();
}
return 42;
}
- Compile with clang
clang-cl.exe -cc1 -triple x86_64-pc-windows-msvc19.50.35730 -emit-obj -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -fwinx64-eh-unwindv2 -cfguard -fms-extensions -o a.obj -x c a.c
Unreachable is fired in X86WinEHUnwindV2::runOnMachineFunction, because it's expecting frame SEH_PushReg to be in prolog, not in finally block
Steps to reproduce:
Unreachable is fired in
X86WinEHUnwindV2::runOnMachineFunction, because it's expectingframe SEH_PushRegto be in prolog, not in finally block