1 # This reproduces a bug where not registering cold fragment entry points
2 # leads to removing blocks and an inconsistent CFG after UCE.
3 # Test assembly was obtained using C-Reduce from this C++ code:
4 # (compiled with `g++ -O2 -Wl,-q`)
11 # throw std::logic_error("");
14 # throw std::logic_error("");
18 # REQUIRES: system-linux
20 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
21 # RUN: %clangxx %cxxflags -no-pie %t.o -o %t.exe -Wl,-q
22 # RUN: llvm-bolt %t.exe -o %t.out --dump-dot-all --funcs=main.* \
23 # RUN: 2>&1 | FileCheck %s
25 # CHECK-NOT: Assertion `isValid()' failed.
29 jmp
.L3 # jump to the secondary entry point in main.cold.0
41 .section .gcc_except_table
50 .uleb128 .L3-main.cold.0
51 .uleb128 .L3-main.cold.0