[LLVMbugs] [Bug 8981] New: Cannot create FP integer constant!
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Jan 15 09:25:35 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=8981
Summary: Cannot create FP integer constant!
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: marc.glisse at normalesup.org
CC: llvmbugs at cs.uiuc.edu
(See b.cc below. The error doesn't appear with -O1)
$ clang++ -O2 -c b.cc
clang: /data/repos/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:925:
llvm::SDValue llvm::SelectionDAG::getConstant(const llvm::ConstantInt&,
llvm::EVT, bool): Assertion `VT.isInteger() && "Cannot create FP integer
constant!"' failed.
0 clang 0x000000000175402f
1 clang 0x0000000001756292
2 libpthread.so.0 0x00007f360dac6f60
3 libc.so.6 0x00007f360cdd9165 gsignal + 53
4 libc.so.6 0x00007f360cddbf70 abort + 384
5 libc.so.6 0x00007f360cdd22b1 __assert_fail + 241
6 clang 0x0000000001191abb
llvm::SelectionDAG::getConstant(llvm::ConstantInt const&, llvm::EVT, bool) +
1419
7 clang 0x0000000001191b76
llvm::SelectionDAG::getConstant(llvm::APInt const&, llvm::EVT, bool) + 54
8 clang 0x00000000011921f4 llvm::SelectionDAG::getConstant(unsigned
long, llvm::EVT, bool) + 244
9 clang 0x00000000010fae54
llvm::X86TargetLowering::PerformDAGCombine(llvm::SDNode*,
llvm::TargetLowering::DAGCombinerInfo&) const + 612
10 clang 0x0000000001165877
11 clang 0x00000000011682f4
llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AliasAnalysis&,
llvm::CodeGenOpt::Level) + 756
12 clang 0x00000000011ec64e
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 1118
13 clang 0x00000000011eed4e
llvm::SelectionDAGISel::SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction
const>, llvm::ilist_iterator<llvm::Instruction const>, bool&) + 270
14 clang 0x00000000011ef3f7
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1639
15 clang 0x00000000011f0433
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1075
16 clang 0x00000000016a4acd
llvm::FPPassManager::runOnFunction(llvm::Function&) + 557
17 clang 0x00000000016a4bcb
llvm::FPPassManager::runOnModule(llvm::Module&) + 75
18 clang 0x00000000016a4657
llvm::MPPassManager::runOnModule(llvm::Module&) + 503
19 clang 0x00000000016a47d7 llvm::PassManagerImpl::run(llvm::Module&)
+ 167
20 clang 0x000000000077ec88
clang::EmitBackendOutput(clang::Diagnostic&, clang::CodeGenOptions const&,
clang::TargetOptions const&, llvm::Module*, clang::BackendAction,
llvm::raw_ostream*) + 2376
21 clang 0x000000000077b54b
22 clang 0x000000000089b75d clang::ParseAST(clang::Sema&, bool) + 301
23 clang 0x000000000077c414 clang::CodeGenAction::ExecuteAction() +
68
24 clang 0x0000000000673205
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 357
25 clang 0x00000000006511dc
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1276
26 clang 0x0000000000648cb5 cc1_main(char const**, char const**, char
const*, void*) + 677
27 clang 0x00000000006501e5 main + 4549
28 libc.so.6 0x00007f360cdc5c4d __libc_start_main + 253
29 clang 0x00000000006473b9
Stack dump:
0. Program arguments: /tmp/clang/inst/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name b.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
/tmp/clang/inst/bin/../lib/clang/2.9 -O2 -ferror-limit 19 -fmessage-length 0
-fexceptions -fgnu-runtime -fdiagnostics-show-option -o b.o -x c++ b.cc
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'b.cc'.
4. Running pass 'X86 DAG->DAG Instruction Selection' on function
'@_ZNK1S1gEv'
int sign ( double x ) {
if ( x < 0. ) return - 1 ;
if ( x > 0. ) return 1 ;
return 0 ;
}
const double * h ( ) ;
struct S {
int f ( ) const ;
int g ( ) const ;
} ;
int S :: g ( ) const {
return f ( ) ? 1 : 2 ;
}
int S :: f ( ) const {
const double * c = h ( ) ;
int d = sign ( * c - * c ) ;
if ( d == 0 ) return 0 ;
return ( d == 0 ) ? 1 : - 1 ;
}
--
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