[LLVMbugs] [Bug 8995] New: Simple valid C++ program failing to compile

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jan 17 06:39:34 PST 2011


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

           Summary: Simple valid C++ program failing to compile
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: chris at bubblescope.net
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


The following program, reduced from many boost testcases, is currently failing
to compile. I'm fairly sure it is simple valid code:

namespace
{
struct ios_base
{
  struct Init
  { Init(); };
};
ios_base::Init __ioinit;
}

Fails on a debug compile of:

clang version 2.9 (trunk 123621)
Target: x86_64-unknown-linux-gnu
Thread model: posix

With:

clang: MachineFunction.cpp:569: unsigned int
llvm::MachineJumpTableInfo::getEntryAlignment(const llvm::TargetData&) const:
Assertion `0 && "Unknown jump table encoding!"' failed.
0  clang           0x0000000002314e21
1  clang           0x0000000002314c14
2  libpthread.so.0 0x00007f4074d928f0
3  libc.so.6       0x00007f4074081a75 gsignal + 53
4  libc.so.6       0x00007f40740855c0 abort + 384
5  libc.so.6       0x00007f407407a941 __assert_fail + 241
6  clang           0x0000000001e3905e
llvm::MachineJumpTableInfo::getEntryAlignment(llvm::TargetData const&) const +
140
7  clang           0x0000000001da0c61 llvm::AsmPrinter::EmitJumpTableInfo() +
449
8  clang           0x0000000001d9f83f llvm::AsmPrinter::EmitFunctionBody() +
2475
9  clang           0x0000000001b461e1
10 clang           0x0000000001e3e7e9
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 95
11 clang           0x000000000224109f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 407
12 clang           0x00000000022412bc
llvm::FPPassManager::runOnModule(llvm::Module&) + 102
13 clang           0x00000000022415ef
llvm::MPPassManager::runOnModule(llvm::Module&) + 459
14 clang           0x0000000002241aed llvm::PassManagerImpl::run(llvm::Module&)
+ 125
15 clang           0x0000000002242043 llvm::PassManager::run(llvm::Module&) +
39
16 clang           0x00000000010e292c
17 clang           0x00000000010e29fd
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 133
18 clang           0x00000000010de796
19 clang           0x00000000012364fb clang::ParseAST(clang::Sema&, bool) + 639
20 clang           0x0000000000fa88f5 clang::ASTFrontendAction::ExecuteAction()
+ 263
21 clang           0x00000000010df61d clang::CodeGenAction::ExecuteAction() +
951
22 clang           0x0000000000fa8546 clang::FrontendAction::Execute() + 320
23 clang           0x0000000000f91197
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 751
24 clang           0x0000000000f3eb19
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 854
25 clang           0x0000000000f30de9 cc1_main(char const**, char const**, char
const*, void*) + 1032
26 clang           0x0000000000f3a0d4 main + 499
27 libc.so.6       0x00007f407406cc4d __libc_start_main + 253
28 clang           0x0000000000f30459
Stack dump:
0.      Program arguments: /llvmdebug/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
t.cc -mrelocation-model static -mdisable-fp-elim -masm-verbose
-mconstructor-aliases -munwind-tables -target-cpu x86-64 -target-linker-version
2.20.1 -resource-dir /llvmdebug/bin/../lib/clang/2.9 -ferror-limit 19
-fmessage-length 199 -fexceptions -fgnu-runtime -fdiagnostics-show-option
-fcolor-diagnostics -o t.o -x c++ t.cc 
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 't.cc'.
4.      Running pass 'X86 AT&T-Style Assembly Printer' on function
'@__cxx_global_var_init'
clang: error: unable to execute command: Aborted
clang: error: clang frontend command failed due to signal 1 (use -v to see
invocation)

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