[llvm-bugs] [Bug 28572] New: address_space attribute on auto variable causes codegen assertion

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jul 15 02:59:01 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28572

            Bug ID: 28572
           Summary: address_space attribute on auto variable causes
                    codegen assertion
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rmoryle at synopsys.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160715/01b64c0c/attachment-0001.html>


More information about the llvm-bugs mailing list