[LLVMbugs] [Bug 13339] New: clang crashes with "PHINode should have one entry for each predecessor of its parent basic block!"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 11 23:04:26 PDT 2012


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

             Bug #: 13339
           Summary: clang crashes with "PHINode should have one entry for
                    each predecessor of its parent basic block!"
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ppelletier at oblong.net
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8877
  --> http://llvm.org/bugs/attachment.cgi?id=8877
phinode-crash-clang-trunk-160030.tar.xz

I built clang yesterday from svn (trunk 160030) on Ubuntu 10.04, and when I
compiled a specific program with clang, I got the following error:

PHINode should have one entry for each predecessor of its parent basic block!
  %51 = phi %"class.oblong::loam::AnkleObject"* [ %35,
%delete.notnull.i.i.i.i.i85 ], [ %35, %land.lhs.true.i.i.i.i.i82 ], [ null,
%entry ], [ null, %entry ]
Broken module found, compilation aborted!
0  clang           0x0000000001f0385f
1  clang           0x0000000001f0576a
2  libpthread.so.0 0x00002b8e692898f0
3  libc.so.6       0x00002b8e69e7ea75 gsignal + 53
4  libc.so.6       0x00002b8e69e825c0 abort + 384
5  clang           0x0000000001ec4230
6  clang           0x0000000001ea293d
llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
7  clang           0x0000000001ea2a23
llvm::FPPassManager::runOnModule(llvm::Module&) + 51
8  clang           0x0000000001ea24b1
llvm::MPPassManager::runOnModule(llvm::Module&) + 497
9  clang           0x0000000001ea262b llvm::PassManagerImpl::run(llvm::Module&)
+ 171
10 clang           0x00000000007d4348
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 1560
11 clang           0x00000000007d1869
12 clang           0x0000000000931ede clang::ParseAST(clang::Sema&, bool, bool)
+ 398
13 clang           0x00000000007d0264 clang::CodeGenAction::ExecuteAction() +
68
14 clang           0x0000000000697b01 clang::FrontendAction::Execute() + 145
15 clang           0x0000000000672fc9
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 329
16 clang           0x000000000065bb44
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1332
17 clang           0x0000000000651a40 cc1_main(char const**, char const**, char
const*, void*) + 944
18 clang           0x000000000065a931 main + 7297
19 libc.so.6       0x00002b8e69e69c4d __libc_start_main + 253
20 clang           0x000000000064f439
Stack dump:
0.    Program arguments: /home/ppelletier/clang/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name tro-test.C
-pie-level 2 -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-target-cpu x86-64 -target-linker-version 2.20.1 -momit-leaf-frame-pointer -g
-coverage-file tro-test.o -resource-dir
/home/ppelletier/clang/bin/../lib/clang/3.2 -dependency-file .deps/tro-test.Tpo
-sys-header-deps -MP -MT tro-test.o -isystem
/opt/oblong/deps/include/boost-1_38 -D HAVE_CONFIG_H -U NDEBUG -D
ENCAPSULATION_IS_GOOD -D _FORTIFY_SOURCE=2 -I . -I ../.. -I ../.. -I
../../libLoam/c -I /opt/oblong/deps/include -fmodule-cache-path
/var/tmp/clang-module-cache -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4 -internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.4/../../../../include/c++/4.4/backward
-internal-isystem /usr/local/include -internal-isystem
/home/ppelletier/clang/bin/../lib/clang/3.2/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O3 -Wempty-body -Wtype-limits -Wall
-Wpointer-arith -Wshadow -Wwrite-strings -Wno-overloaded-virtual
-Wno-strict-overflow -Wno-unused-command-line-argument -Wvla -Werror
-fconst-strings -fdeprecated-macro -fdebug-compilation-dir
/home/ppelletier/src/yovo/projects/interzone-now -ferror-limit 19
-fmessage-length 80 -fwrapv -stack-protector 2 -mstackrealign
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -o tro-test.o -x c++ tro-test.C 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'tro-test.C'.
4.    Running pass 'Module Verifier' on function '@main'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.2 (trunk 160030)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: 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: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/tro-test-ktrl9x.cpp
clang: note: diagnostic msg: /tmp/tro-test-ktrl9x.sh
clang: note: diagnostic msg: 

********************

The requested files are in the attached .tar.xz archive.

-- 
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