[LLVMbugs] [Bug 15008] New: Assertion `C1->getType() == C2->getType() && "Operand types in binary constant expression should match"' failed
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Jan 20 03:17:01 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15008
Bug #: 15008
Summary: Assertion `C1->getType() == C2->getType() && "Operand
types in binary constant expression should match"'
failed
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 !
Using LLVM/Clang 3.3 as of now (r172971) at -O3 :
$ cat assert.c
int a, b, c, d, k, **g;
void f(void)
{
int e;
long h;
for(;; e++)
{
for(; a; a++)
for(; b; b++)
k && (a |= 0) && d && h != (e ? : d) ? **g = 0 : (c = h += k);
for(; k; k++)
{
long *q = 1;
e /= *q && (c ? *q : b);
}
}
}
$ clong -O3 -w assert.c
clang: /home/merkil/clang/llvm/lib/IR/Constants.cpp:1654: static
llvm::Constant* llvm::ConstantExpr::get(unsigned int, llvm::Constant*,
llvm::Constant*, unsigned int): Assertion `C1->getType() == C2->getType() &&
"Operand types in binary constant expression should match"' failed.
0 clang 0x0000000001d5f572 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 clang 0x0000000001d5f1c9
2 libpthread.so.0 0x00007ff10dc22030
3 libc.so.6 0x00007ff10cd10475 gsignal + 53
4 libc.so.6 0x00007ff10cd136f0 abort + 384
5 libc.so.6 0x00007ff10cd09621 __assert_fail + 241
6 clang 0x0000000001c5d09c llvm::ConstantExpr::get(unsigned int,
llvm::Constant*, llvm::Constant*, unsigned int) + 780
7 clang 0x0000000001ad86c8 llvm::ConstantFoldInstOperands(unsigned
int, llvm::Type*, llvm::ArrayRef<llvm::Constant*>, llvm::DataLayout const*,
llvm::TargetLibraryInfo const*) + 296
8 clang 0x0000000001adaf58
llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::DataLayout const*,
llvm::TargetLibraryInfo const*) + 1000
9 clang 0x00000000019ce964
10 clang 0x00000000019cf504
11 clang 0x0000000001cf6e4f
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
12 clang 0x0000000001aa6506
13 clang 0x0000000001cf6ae7
llvm::MPPassManager::runOnModule(llvm::Module&) + 663
14 clang 0x0000000001cfa277 llvm::PassManagerImpl::run(llvm::Module&)
+ 231
15 clang 0x00000000008e5e2a
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 3482
16 clang 0x00000000008e390f
17 clang 0x0000000000a2f7ea clang::ParseAST(clang::Sema&, bool, bool)
+ 538
18 clang 0x00000000008e1fae clang::CodeGenAction::ExecuteAction() +
78
19 clang 0x0000000000781186 clang::FrontendAction::Execute() + 150
20 clang 0x0000000000764555
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 341
21 clang 0x000000000074c2d2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1426
22 clang 0x0000000000745978 cc1_main(char const**, char const**, char
const*, void*) + 920
23 clang 0x000000000073a416 main + 4950
24 libc.so.6 0x00007ff10ccfcead __libc_start_main + 253
25 clang 0x0000000000744989
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
assert.c -mrelocation-model static -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -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.3
-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.3/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-w -fdebug-compilation-dir /home/merkil -ferror-limit 19 -fmessage-length 0
-mstackrealign -fobjc-runtime=gcc -fdiagnostics-show-option -backend-option
-vectorize-loops -o /tmp/assert-exS3HJ.o -x c assert.c
1. <eof> parser at end of file
2. Per-module optimization passes
3. Running pass 'CallGraph Pass Manager' on module 'assert.c'.
4. Running pass 'Combine redundant instructions' 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.3 (trunk 172971)
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.
--
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