Skip to content

[AArch64] UnwindInfo cannot be emitted if inline asm with align or fill are used #47432

@RIscRIpt

Description

@RIscRIpt
Bugzilla Link 48088
Version 11.0
OS Windows NT
CC @RIscRIpt

Extended Description

For more info see FIXME in ARM64EmitUnwindInfo (llvm/lib/MC/MCWin64EH.cpp)
https://github.com/llvm/llvm-project/blob/f69e090/llvm/lib/MC/MCWin64EH.cpp#L918-L943

Reproducible example:

void test() { __asm__(".balign 1");  }

Compiling with:

clang.exe --target=x86_64-pc-windows -c test.cpp

Gives no error, however, compiling with

clang.exe --target=aarch64-pc-windows -c test.cpp

Crashes:

fatal error: error in backend: Failed to evaluate function length in SEH unwind info
Stack dump:

0.      Program arguments: clang.exe --target=aarch64-pc-windows -c test.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'test.cpp'.
4.      Running pass 'AArch64 Assembly Printer' on function '@"?test@@YAXXZ"'

Related bug report: #40926

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillallvm:mcMachine (object) code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions