[LLVMbugs] [Bug 12886] New: UNREACHABLE executed at SelectionDAG.cpp:5594

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sat May 19 04:38:05 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=12886

             Bug #: 12886
           Summary: UNREACHABLE executed at SelectionDAG.cpp:5594
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: merkil33 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following testcase doesn't compile at -O1 and more with LLVM/Clang as of
157108.

$ cat file.c
unsigned char uc0;

void func(void)
{
    int i0, i1;

    uc0 = (i1 ? : (0 ? : (0 == uc0)));
    (uc0 / (++uc0)) ? : (uc0 = 0);
}


$ ~/clang/build/Release+Asserts/bin/clang -O1 -w file.c

Overran sorted position:
0x189fd3d0: ch = store 0x189fc8d0:1, 0x189fccd0, 0x189fc6d0,
0x189fc7d0<ST1[@uc0]> [ID=1]
  0x189fccd0: i8,glue = <<Unknown Node #206>> 0x189ff500, 0x189fc9d0,
0x189ff700, 0x189fcdd0 [ID=1]
    0x189ff500: i8 = add 0x189fd2d0, 0x189fced0 [ID=11]
      0x189fd2d0: i8 = <<Unknown Node #201>> 0x189ff700, 0x189fcfd0 [ID=10]
        0x189ff700: i8 = Constant<4> [ID=5]
        0x189fcfd0: i32 = <<Unknown Node #197>> 0x189fc8d0, 0x189fc9d0 [ID=9]
          0x189fc8d0: i8,ch = load 0x189c6970, 0x189fc6d0,
0x189fc7d0<LD1[@uc0](tbaa=!"omnipotent char")> [ID=8]
            0x189fc6d0: i64 = <<Unknown Node #212>> 0x189fcad0 [ID=7]
              0x189fcad0: i64 = TargetGlobalAddress<i8* @uc0> 0 [ID=6]
            0x189fc7d0: i64 = undef [ID=1]
          0x189fc9d0: i8 = Constant<0> [ID=2]
      0x189fced0: i8 = Constant<1> [ID=3]
    0x189fc9d0: i8 = Constant<0> [ID=2]
    0x189ff700: i8 = Constant<4> [ID=5]
    0x189fcdd0: i32 = <<Unknown Node #197>> 0x189fd0d0, 0x189fc9d0 [ID=12]
      0x189fd0d0: i8 = srl 0x189fc6d0, 0x189fd2d0 [ID=1]
        0x189fc6d0: i64 = <<Unknown Node #212>> 0x189fcad0 [ID=7]
          0x189fcad0: i64 = TargetGlobalAddress<i8* @uc0> 0 [ID=6]
        0x189fd2d0: i8 = <<Unknown Node #201>> 0x189ff700, 0x189fcfd0 [ID=10]
          0x189ff700: i8 = Constant<4> [ID=5]
          0x189fcfd0: i32 = <<Unknown Node #197>> 0x189fc8d0, 0x189fc9d0 [ID=9]
            0x189fc8d0: i8,ch = load 0x189c6970, 0x189fc6d0,
0x189fc7d0<LD1[@uc0](tbaa=!"omnipotent char")> [ID=8]
              0x189fc6d0: i64 = <<Unknown Node #212>> 0x189fcad0 [ID=7]
                0x189fcad0: i64 = TargetGlobalAddress<i8* @uc0> 0 [ID=6]
              0x189fc7d0: i64 = undef [ID=1]
            0x189fc9d0: i8 = Constant<0> [ID=2]
      0x189fc9d0: i8 = Constant<0> [ID=2]
  0x189fc6d0: i64 = <<Unknown Node #212>> 0x189fcad0 [ID=7]
    0x189fcad0: i64 = TargetGlobalAddress<i8* @uc0> 0 [ID=6]
  0x189fc7d0: i64 = undef [ID=1]UNREACHABLE executed at
/home/merkil/clang/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:5594!
0  clang           0x0000000001e5087f
1  clang           0x0000000001e50d69
2  libpthread.so.0 0x00002b380df29030
3  libc.so.6       0x00002b380eb0d475 gsignal + 53
4  libc.so.6       0x00002b380eb106f0 abort + 384
5  clang           0x0000000001e3d51c
6  clang           0x00000000016f9277
llvm::SelectionDAG::AssignTopologicalOrder() + 951
7  clang           0x0000000001765340
llvm::SelectionDAGISel::DoInstructionSelection() + 64
8  clang           0x000000000176c2bc
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1308
9  clang           0x000000000176f309
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 2169
10 clang           0x0000000001770e44
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 772
11 clang           0x0000000001dec73f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 607
12 clang           0x0000000001dec793
llvm::FPPassManager::runOnModule(llvm::Module&) + 51
13 clang           0x0000000001dec30c
llvm::MPPassManager::runOnModule(llvm::Module&) + 524
14 clang           0x0000000001dec417 llvm::PassManagerImpl::run(llvm::Module&)
+ 151
15 clang           0x00000000008b7368
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 2088
16 clang           0x00000000008b543f
17 clang           0x00000000009e7e4d clang::ParseAST(clang::Sema&, bool, bool)
+ 461
18 clang           0x00000000008b41d4 clang::CodeGenAction::ExecuteAction() +
68
19 clang           0x00000000007696b1
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 337
20 clang           0x00000000007506da
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1098
21 clang           0x0000000000749b10 cc1_main(char const**, char const**, char
const*, void*) + 8992
22 clang           0x00000000007393b9 main + 7689
23 libc.so.6       0x00002b380eaf9ead __libc_start_main + 253
24 clang           0x0000000000746c49
Stack dump:
0.    Program arguments: /home/merkil/clang/build/Release+Asserts/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
file.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.22 -momit-leaf-frame-pointer -resource-dir
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.2
-fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem
/usr/local/include -internal-isystem
/home/merkil/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil/misc/creduce/c_reduce -ferror-limit 19
-fmessage-length 169 -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc
-fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/file-995khT.o -x c file.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'file.c'.
4.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@func'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang: note: diagnostic msg: Please submit a bug report to
http://llvm.org/bugs/ and include command line arguments and all diagnostic
information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run
script(s) are located at:
clang: note: diagnostic msg: /tmp/file-6o5L0v.i
clang: note: diagnostic msg: /tmp/file-6o5L0v.sh

This is a regression, since it compiles fine with clang 3.0.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list