<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - address_space attribute on auto variable causes codegen assertion"
href="https://llvm.org/bugs/show_bug.cgi?id=28572">28572</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>address_space attribute on auto variable causes codegen assertion
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>LLVM Codegen
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>rmoryle@synopsys.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Compile:
void fn1() {
__attribute__((address_space(7))) int a;
&a == 0;
}
using "clang -x cl test.c"
clang-3.9: /home/rmoryle/llvm/llvm/include/llvm/IR/Instructions.h:1100: void
llvm::ICmpInst::AssertOK(): Assertion `getOperand(0)->getType() ==
getOperand(1)->getType() && "Both operands to ICmp instruction are not of the
same type!"' failed.
#0 0x00000000019bc1b8 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/rmoryle/llvm/build/bin/clang-3.9+0x19bc1b8)
#1 0x00000000019bc926 SignalHandler(int)
(/home/rmoryle/llvm/build/bin/clang-3.9+0x19bc926)
#2 0x00007f87c62863d0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x113d0)
#3 0x00007f87c4df1418 gsignal
/build/glibc-GKVZIf/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#4 0x00007f87c4df301a abort /build/glibc-GKVZIf/glibc-2.23/stdlib/abort.c:91:0
#5 0x00007f87c4de9bd7 __assert_fail_base
/build/glibc-GKVZIf/glibc-2.23/assert/assert.c:92:0
#6 0x00007f87c4de9c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#7 0x0000000000c0c663 llvm::ICmpInst::ICmpInst(llvm::CmpInst::Predicate,
llvm::Value*, llvm::Value*, llvm::Twine const&)
(/home/rmoryle/llvm/build/bin/clang-3.9+0xc0c663)
#8 0x0000000001b713f0 llvm::IRBuilder<llvm::ConstantFolder,
clang::CodeGen::CGBuilderInserter>::CreateICmp(llvm::CmpInst::Predicate,
llvm::Value*, llvm::Value*, llvm::Twine const&)
(/home/rmoryle/llvm/build/bin/clang-3.9+0x1b713f0)
#9 0x0000000001d1db78 (anonymous
namespace)::ScalarExprEmitter::EmitCompare(clang::BinaryOperator const*,
llvm::CmpInst::Predicate, llvm::CmpInst::Predicate, llvm::CmpInst::Predicate)
(/home/rmoryle/llvm/build/bin/clang-3.9+0x1d1db78)
#10 0x0000000001d0bbd6
.....</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>