Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang crashes on valid code at -O3 in 64-bit mode on x86_64-linux-gnu: Assertion `SuccChain.UnscheduledPredecessors == 0 && "Found CFG-violating block"' failed #35362

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR36389
Status NEW
Importance P enhancement
Reported by Zhendong Su (su@cs.ucdavis.edu)
Reported on 2018-02-14 22:43:41 -0800
Last modified on 2018-11-04 03:16:22 -0800
Version unspecified
Hardware PC All
CC ditaliano@apple.com, llvm-bugs@lists.llvm.org, llvm-dev@ndave.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Tested with trunk revision 325135. The reduced code is still very hairy.

$ clangpolly -v
clang version 7.0.0 (http://llvm.org/git/clang.git
1532324f1979660b1fc429eff544e1a9c1b79332) (http://llvm.org/git/llvm.git
ba2e473a530286f386d18a95c9de4d673d4a21dc)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/6.0.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.4
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clangpolly -m64 -O2 small.c
$ clangpolly -m32 -O3 small.c
$
$ clangpolly -m64 -O3 small.c
clang-6.0:
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1591:
llvm::MachineBasicBlock*
{anonymous}::MachineBlockPlacement::selectBestCandidateBlock(const
{anonymous}::BlockChain&, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&):
Assertion `SuccChain.UnscheduledPredecessors == 0 && "Found CFG-violating
block"' failed.
#0 0x000000000219695a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/su/software/tmp/polly/llvm/lib/Support/Unix/Signals.inc:402:0
#1 0x00000000021947ee llvm::sys::RunSignalHandlers()
/home/su/software/tmp/polly/llvm/lib/Support/Signals.cpp:50:0
#2 0x0000000002194962 SignalHandler(int)
/home/su/software/tmp/polly/llvm/lib/Support/Unix/Signals.inc:242:0
#3 0x00007f5b14372390 __restore_rt (/lib/x86_64-linux-
gnu/libpthread.so.0+0x11390)
#4 0x00007f5b130e4428 gsignal /build/glibc-bfm8X4/glibc-
2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f5b130e602a abort /build/glibc-bfm8X4/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f5b130dcbd7 __assert_fail_base /build/glibc-bfm8X4/glibc-
2.23/assert/assert.c:92:0
#7 0x00007f5b130dcc82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x0000000001b60dbe LookupBucketFor<const llvm::MachineBasicBlock*>
/home/su/software/tmp/polly/llvm/include/llvm/ADT/DenseMap.h:618:0
#9 0x0000000001b60dbe lookup
/home/su/software/tmp/polly/llvm/include/llvm/ADT/DenseMap.h:183:0
#10 0x0000000001b60dbe operator()
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1571:0
#11 0x0000000001b60dbe operator()<llvm::MachineBasicBlock**>
/usr/include/c++/5/bits/predefined_ops.h:234:0
#12 0x0000000001b60dbe __find_if<llvm::MachineBasicBlock**,
__gnu_cxx::__ops::_Iter_pred<(anonymous
namespace)::MachineBlockPlacement::selectBestCandidateBlock(const (anonymous
namespace)::BlockChain&,
llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&)::<lambda(llvm::MachineBasicBlock*)>
> > /usr/include/c++/5/bits/stl_algo.h:120:0
#13 0x0000000001b60dbe __find_if<llvm::MachineBasicBlock**,
__gnu_cxx::__ops::_Iter_pred<(anonymous
namespace)::MachineBlockPlacement::selectBestCandidateBlock(const (anonymous
namespace)::BlockChain&,
llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&)::<lambda(llvm::MachineBasicBlock*)>
> > /usr/include/c++/5/bits/stl_algo.h:162:0
#14 0x0000000001b60dbe __remove_if<llvm::MachineBasicBlock**,
__gnu_cxx::__ops::_Iter_pred<(anonymous
namespace)::MachineBlockPlacement::selectBestCandidateBlock(const (anonymous
namespace)::BlockChain&,
llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&)::<lambda(llvm::MachineBasicBlock*)>
> > /usr/include/c++/5/bits/stl_algo.h:860:0
#15 0x0000000001b60dbe remove_if<llvm::MachineBasicBlock**, (anonymous
namespace)::MachineBlockPlacement::selectBestCandidateBlock(const (anonymous
namespace)::BlockChain&,
llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&)::<lambda(llvm::MachineBasicBlock*)>
> /usr/include/c++/5/bits/stl_algo.h:937:0
#16 0x0000000001b60dbe
remove_if<llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&, (anonymous
namespace)::MachineBlockPlacement::selectBestCandidateBlock(const (anonymous
namespace)::BlockChain&,
llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&)::<lambda(llvm::MachineBasicBlock*)>
> /home/su/software/tmp/polly/llvm/include/llvm/ADT/STLExtras.h:855:0
#17 0x0000000001b60dbe (anonymous
namespace)::MachineBlockPlacement::selectBestCandidateBlock((anonymous
namespace)::BlockChain const&,
llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&) [clone .constprop.382]
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1569:0
#18 0x0000000001b65542 (anonymous
namespace)::MachineBlockPlacement::buildChain(llvm::MachineBasicBlock const*,
(anonymous namespace)::BlockChain&,
llvm::SmallSetVector<llvm::MachineBasicBlock const*, 16u>*) [clone
.constprop.367]
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1713:0
#19 0x0000000001b69761 (anonymous
namespace)::MachineBlockPlacement::buildCFGChains() [clone .constprop.358]
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineBlockPlacement.cpp:2354:0
#20 0x0000000001b6a971 llvm::TargetMachine::requiresStructuredCFG() const
/home/su/software/tmp/polly/llvm/include/llvm/Target/TargetMachine.h:160:0
#21 0x0000000001b6a971 (anonymous
namespace)::MachineBlockPlacement::runOnMachineFunction(llvm::MachineFunction&)
[clone .part.344] [clone .constprop.351]
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineBlockPlacement.cpp:2775:0
#22 0x0000000001992335
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineFunctionPass.cpp:62:0
#23 0x0000000001cc651b llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/su/software/tmp/polly/llvm/lib/IR/LegacyPassManager.cpp:1520:0
#24 0x0000000001cc65dc llvm::FPPassManager::runOnModule(llvm::Module&)
/home/su/software/tmp/polly/llvm/lib/IR/LegacyPassManager.cpp:1541:0
#25 0x0000000001cc611d runOnModule
/home/su/software/tmp/polly/llvm/lib/IR/LegacyPassManager.cpp:1597:0
#26 0x0000000001cc611d llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/su/software/tmp/polly/llvm/lib/IR/LegacyPassManager.cpp:1700:0
#27 0x0000000002352492 llvm::PrettyStackTraceString::~PrettyStackTraceString()
/home/su/software/tmp/polly/llvm/include/llvm/Support/PrettyStackTrace.h:52:0
#28 0x0000000002352492 EmitAssembly
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:806:0
#29 0x0000000002352492 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp:1180:0
#30 0x0000000002b9a337 std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >::~unique_ptr()
/usr/include/c++/5/bits/unique_ptr.h:235:0
#31 0x0000000002b9a337
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:292:0
#32 0x0000000002d6fc90 clang::ParseAST(clang::Sema&, bool, bool)
/home/su/software/tmp/polly/llvm/tools/clang/lib/Parse/ParseAST.cpp:164:0
#33 0x0000000002b997cf clang::CodeGenAction::ExecuteAction()
/home/su/software/tmp/polly/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp:1032:0
#34 0x000000000271e3de clang::FrontendAction::Execute()
/home/su/software/tmp/polly/llvm/tools/clang/lib/Frontend/FrontendAction.cpp:904:0
#35 0x00000000026ed796
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/su/software/tmp/polly/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp:992:0
#36 0x00000000027aed6b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/su/software/tmp/polly/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:255:0
#37 0x0000000000ac9da8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*)
/home/su/software/tmp/polly/llvm/tools/clang/tools/driver/cc1_main.cpp:221:0
#38 0x0000000000a3e920 ExecuteCC1Tool
/home/su/software/tmp/polly/llvm/tools/clang/tools/driver/driver.cpp:309:0
#39 0x0000000000a3e920 main
/home/su/software/tmp/polly/llvm/tools/clang/tools/driver/driver.cpp:389:0
#40 0x00007f5b130cf830 __libc_start_main /build/glibc-bfm8X4/glibc-
2.23/csu/../csu/libc-start.c:325:0
#41 0x0000000000ac61d9 _start (/home/su/software/tmp/polly/llvm_build/bin/clang-
6.0+0xac61d9)
Stack dump:
0.  Program arguments: /home/su/software/tmp/polly/llvm_build/bin/clang-6.0 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-
verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-
64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-
dir /home/su/software/tmp/polly/llvm_build/lib/clang/7.0.0 -internal-isystem
/usr/local/include -internal-isystem
/home/su/software/tmp/polly/llvm_build/lib/clang/7.0.0/include -internal-
externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O3 -fdebug-compilation-dir
/home/su -ferror-limit 19 -fmessage-length 116 -fobjc-runtime=gcc -fdiagnostics-
show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/small-
caa26e.o -x c small.c
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module 'small.c'.
4.  Running pass 'Branch Probability Basic Block Placement' on function '@fn1'
clang-6.0: error: unable to execute command: Aborted (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 7.0.0 (http://llvm.org/git/clang.git
1532324f1979660b1fc429eff544e1a9c1b79332) (http://llvm.org/git/llvm.git
ba2e473a530286f386d18a95c9de4d673d4a21dc)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
clang-6.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-6.0: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/small-d42da2.c
clang-6.0: note: diagnostic msg: /tmp/small-d42da2.sh
clang-6.0: note: diagnostic msg:

********************
$

--------------------------------------------------

int printf (const char *, ...);

struct A
{
  int d:1;
  int e:8;
  unsigned f:2;
} g, n;

int a, h, k, l, o, p, r, v, x, c, aa, ab, z;
short b, t, ac;
unsigned m;
char q, s, u, w, d, e, f, y;

void fn1 (int ae)
{
  int af, ag, ah = 0, ai, aj, i, j;
ak:{
    short al;
    struct A am, an;
    int ao, ap = 1, aq = 0 | ap;
    if (c)
      {
    char b;
    if (k)
      {
        if (s)
          goto ar;
        if (t)
          goto as;
        goto ak;
      }
    am.e = aj = printf ("\n");
      }
    ag = b;
    if (!a)
      {
    if (p < ab)
      u++;
    for (i = 0; i < 1; i++)
      {
        int at, au;
        if (o)
          {
        at = -af, au = af;
        af = at;
        char av = ai % 646563L;
        if (t)
          ai = printf ("%d\n", ai);
        if (b)
          goto aw;
        e = av;
        while (a)
          ;
          ax:
        if (o)
          {
            printf ("%d\n", r);
            continue;
          }
          ar:
        if (au)
          {
            printf ("%d\n", at);
            goto ax;
          }
        if (f && g.f)
          break;
          }
        for (j = 0; j < 2; j++)
          {
        if (m)
          {
            while (aj)
              if (ag)
            printf ("%d\n", p);
            printf ("%d\n", y);
          }
        m = 0;
          }
      }
    if (aa)
      while (l)
        {
          struct A ay;
        az:
        as:
          ay.d = p;
          if (ac)
        {
          al = p;
          goto az;
        }
          if (!al)
        continue;
          if (q)
        {
          ac = al / am.f;
          goto as;
        }
          while (ay.f)
        printf ("%d%d\n", z, ai);
          while (1)
        {
          printf ("%d\n", i);
          ah = t;
          break;
        }
        }
    if (h)
    aw:
      n = g;
    else
      {
        if (b)
          an = am;
        else
          {
        for (; aq < 7; aq++)
          if (x)
            printf ("\n");
        printf ("%d\n", ah);
        while (1)
          return;
          }
        for (ao = 0; ao < 4; ao++)
          while (v)
        printf ("%d\n", v);
      }
      }
    s || (w = ae);
    while (ah)
      if (an.d)
    while (w++)
      an.e = ae;
  }
}

int main ()
{
  fn1 (0);
  return 0;
}
Quuxplusone commented 6 years ago
Encountered the same crash again with the following somewhat smaller test
(tested with trunk revision 346071):

$ clangpolly -O3 small.c
clang-6.0:
/home/su/software/tmp/polly/llvm/lib/CodeGen/MachineBlockPlacement.cpp:1599:
llvm::MachineBasicBlock*
{anonymous}::MachineBlockPlacement::selectBestCandidateBlock(const
{anonymous}::BlockChain&, llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&):
Assertion `SuccChain.UnscheduledPredecessors == 0 && "Found CFG-violating
block"' failed.
Stack dump:
0.  Program arguments: /home/su/software/tmp/polly/llvm_build/bin/clang-6.0 -cc1
-triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
small.c -mrelocation-model static -mthread-model posix -fmath-errno -masm-
verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-
64 -dwarf-column-info -debugger-tuning=gdb -momit-leaf-frame-pointer -resource-
dir /home/su/software/tmp/polly/llvm_build/lib/clang/8.0.0 -internal-isystem
/usr/local/include -internal-isystem
/home/su/software/tmp/polly/llvm_build/lib/clang/8.0.0/include -internal-
externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem
/include -internal-externc-isystem /usr/include -O3 -fdebug-compilation-dir
/home/su -ferror-limit 19 -fmessage-length 96 -fobjc-runtime=gcc -fdiagnostics-
show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o /tmp/small-
1fe757.o -x c small.c -faddrsig
1.  <eof> parser at end of file
2.  Code generation
3.  Running pass 'Function Pass Manager' on module 'small.c'.
4.  Running pass 'Branch Probability Basic Block Placement' on function '@y'
#0 0x00000000024ec3fa llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x24ec3fa)
#1 0x00000000024ea78c llvm::sys::RunSignalHandlers()
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x24ea78c)
#2 0x00000000024ea8f7 SignalHandler(int)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x24ea8f7)
#3 0x00007f1dbb868390 __restore_rt (/lib/x86_64-linux-
gnu/libpthread.so.0+0x11390)
#4 0x00007f1dba5da428 gsignal /build/glibc-Cl5G7W/glibc-
2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f1dba5dc02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f1dba5d2bd7 __assert_fail_base /build/glibc-Cl5G7W/glibc-
2.23/assert/assert.c:92:0
#7 0x00007f1dba5d2c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x0000000001e0a991 (anonymous
namespace)::MachineBlockPlacement::selectBestCandidateBlock((anonymous
namespace)::BlockChain const&,
llvm::SmallVectorImpl<llvm::MachineBasicBlock*>&) (.constprop.396)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x1e0a991)
#9 0x0000000001e14d4c (anonymous
namespace)::MachineBlockPlacement::buildCFGChains() (.constprop.363)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x1e14d4c)
#10 0x0000000001e161e5 (anonymous
namespace)::MachineBlockPlacement::runOnMachineFunction(llvm::MachineFunction&)
(.part.344.constprop.354) (/home/su/software/tmp/polly/llvm_build/bin/clang-
6.0+0x1e161e5)
#11 0x0000000001bff291
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(.part.34.constprop.35) (/home/su/software/tmp/polly/llvm_build/bin/clang-
6.0+0x1bff291)
#12 0x0000000001f7fb6c llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x1f7fb6c)
#13 0x0000000001f7fd4c llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x1f7fd4c)
#14 0x0000000001f80e69 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x1f80e69)
#15 0x00000000026cb57d (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x26cb57d)
#16 0x00000000026cce76 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x26cce76)
#17 0x0000000002fd9957
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x2fd9957)
#18 0x0000000003591869 clang::ParseAST(clang::Sema&, bool, bool)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x3591869)
#19 0x0000000002fd8ccf clang::CodeGenAction::ExecuteAction()
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x2fd8ccf)
#20 0x0000000002b35f5e clang::FrontendAction::Execute()
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x2b35f5e)
#21 0x0000000002afcd7e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x2afcd7e)
#22 0x0000000002bd7da0
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0x2bd7da0)
#23 0x0000000000affda8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/su/software/tmp/polly/llvm_build/bin/clang-6.0+0xaffda8)
#24 0x0000000000a5d056 main (/home/su/software/tmp/polly/llvm_build/bin/clang-
6.0+0xa5d056)
#25 0x00007f1dba5c5830 __libc_start_main /build/glibc-Cl5G7W/glibc-
2.23/csu/../csu/libc-start.c:325:0
#26 0x0000000000afba49 _start (/home/su/software/tmp/polly/llvm_build/bin/clang-
6.0+0xafba49)
clang-6: error: unable to execute command: Aborted (core dumped)
clang-6: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 8.0.0 (http://llvm.org/git/clang.git
6974b990e13dfb4190a6dffdcc8bac9edbd1cde5) (http://llvm.org/git/llvm.git
7fad5fb0d0d32beea4e95e239cc065a850733358)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/su/bin
clang-6: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-6: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6: note: diagnostic msg: /tmp/small-81041e.c
clang-6: note: diagnostic msg: /tmp/small-81041e.sh
clang-6: note: diagnostic msg:

********************
$

---------------------------------------

int printf (const char *, ...);

int a, d, *e;
char b = 1;
short c, k;
static int *f, *g;

void y ()
{
  short j = 0, l, p = -1 / b;
  unsigned m;
  int i, n;
  unsigned char o;
  if (!(d < l))
    {
    L1:
      o = o % a;
      short q = j || k;
      char r = c;
      int s = q & c;
      j = (c || r) | (l & (~0 || d));
      if (c && o)
    printf ("0");
      if (r > 4)
    goto L2;
      short u = o % b;
      if (u)
    {
      if (l > 0 || o)
        {
          printf ("%d", c);
          goto L1;
        }
      if (d || c)
        goto L3;
    }
      i = u;
      n = s;
      if (!d)
    goto L1;
      if (n)
    {
      e = f;
      if (*f)
        printf ("0");
    }
      short w = ~l;
    L2:
      if (w > 4)
    {
    L3:
      if (b)
        printf ("%d", k);
      goto L2;
    }
    }
  if (k > o)
    goto L4;
  m = i % k;
  int h = m ^ j;
  if (j)
    *f = 0;
  while (a)
    f++;
  if (h)
    goto L5;
L4:
  if ((c && i < j) || !j)
    if (d && i)
      {
    printf ("%lld", (long long) j);
    goto L4;
      }
  if (m)
    *g = 0;
  l = p;
  int v = -1 / j;
  if (c && !n)
    goto L2;
L5:
  if (v)
    goto L1;
  int x = n % o;
  c = x;
}

int main ()
{
  if (a)
    y ();
  return 0;
}