xref: /llvm-project/bolt/test/X86/indirect-goto.test (revision 11791ae7b0b05b8bd8d806331ff51da618912cf8)
1## Check llvm-bolt processes binaries compiled from sources that use indirect goto.
2RUN: %clang %cflags -no-pie %S/Inputs/indirect_goto.c -Wl,-q -o %t
3RUN: llvm-bolt %t -o %t.null --relocs=1 --print-cfg --print-only=main \
4RUN:   --strict \
5RUN:   2>&1 | FileCheck %s
6
7## Check that all possible destinations are included as successors.
8CHECK:  jmpq    *%rax # UNKNOWN CONTROL FLOW
9CHECK:  Successors: .Ltmp0, .Ltmp1, .Ltmp2
10