[LLVMbugs] [Bug 14271] New: Assertion `N.getNode()->getNodeId() != NewNode && "Mapped to new node!"'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Nov 6 03:52:16 PST 2012


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

             Bug #: 14271
           Summary: Assertion `N.getNode()->getNodeId() != NewNode &&
                    "Mapped to new node!"'
           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: antoine.balestrat at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Hello !
LLVM/Clang as of r167445 fails to compile the following testcase at -O1 and
higher in 32 bits mode.

$ cat newnode.c
void f(void)
{
    unsigned short a, *p;
    long long b;

    for(;;)
    {
        a = ++b;
        (a *= a || 1 | (b = 0)) && (*p = a + b ? : a == 1);
        p = &b;
    }
}

$ clong -w -O1 -m32 newnode.c
clang:
/home/merkil/git/clang/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp:618:
void llvm::DAGTypeLegalizer::RemapValue(llvm::SDValue &): Assertion
`N.getNode()->getNodeId() != NewNode && "Mapped to new node!"' failed.
0  clang           0x0000000001aad3ef
1  clang           0x0000000001aad8d3
2  libpthread.so.0 0x00007fb73248a910
3  libc.so.6       0x00007fb7316f3ff5 gsignal + 53
4  libc.so.6       0x00007fb7316f5307 abort + 327
5  libc.so.6       0x00007fb7316ed1b2
6  libc.so.6       0x00007fb7316ed262
7  clang           0x00000000014831bf
8  clang           0x0000000001482d72
9  clang           0x00000000014821cf
10 clang           0x0000000001482256
11 clang           0x0000000001481a82
12 clang           0x0000000001488607 llvm::SelectionDAG::LegalizeTypes() + 423
13 clang           0x0000000001431f29
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1433
14 clang           0x00000000014314f6
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 7014
15 clang           0x000000000142edf4
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1156
16 clang           0x0000000001568f94
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 116
17 clang           0x0000000001a12a4b
llvm::FPPassManager::runOnFunction(llvm::Function&) + 443
18 clang           0x0000000001a12cab
llvm::FPPassManager::runOnModule(llvm::Module&) + 155
19 clang           0x0000000001a12f23
llvm::MPPassManager::runOnModule(llvm::Module&) + 419
20 clang           0x0000000001a134a8 llvm::PassManagerImpl::run(llvm::Module&)
+ 408
21 clang           0x0000000001a1360a llvm::PassManager::run(llvm::Module&) +
10
22 clang           0x00000000007a2947
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 5863
23 clang           0x00000000007a03fa
24 clang           0x00000000008d4d05 clang::ParseAST(clang::Sema&, bool, bool)
+ 549
25 clang           0x000000000079f442 clang::CodeGenAction::ExecuteAction() +
178
26 clang           0x0000000000641295 clang::FrontendAction::Execute() + 101
27 clang           0x000000000062332d
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
28 clang           0x00000000006098a8
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3768
29 clang           0x00000000006009c6 cc1_main(char const**, char const**, char
const*, void*) + 694
30 clang           0x0000000000605a16 main + 3574
31 libc.so.6       0x00007fb7316e0985 __libc_start_main + 245
32 clang           0x000000000060064d
Stack dump:
0.    Program arguments: /home/merkil/git/clang/build/Release+Asserts/bin/clang
-cc1 -triple i386-unknown-linux-gnu -emit-obj -disable-free -main-file-name
newnode.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -fuse-init-array -target-cpu pentium4
-target-linker-version 2.22.90.20120727 -momit-leaf-frame-pointer -resource-dir
/home/merkil/git/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/git/clang/build/Release+Asserts/bin/../lib/clang/3.2/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-w -fdebug-compilation-dir /home/merkil -ferror-limit 19 -fmessage-length 0
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -o
/tmp/newnode-r5qEJB.o -x c newnode.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'newnode.c'.
4.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@f'
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 167445)
Target: i386-unknown-linux-gnu

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