[LLVMbugs] [Bug 22383] New: Invalid constantexpr bitcast when compiling for -target nvptx -x cuda

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 29 04:41:26 PST 2015


            Bug ID: 22383
           Summary: Invalid constantexpr bitcast when compiling for
                    -target nvptx -x cuda
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: yaron.keren at gmail.com
                CC: justin.holewinski at gmail.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Compiling this one-line file example.cpp:

 __attribute__((device)) __attribute__((__used__)) int a[] = {};

with r227430:

 clang -target nvptx -x cuda example.cpp -S -Xclang -fcuda-is-device

results in:

 Assertion failed: CastInst::castIsValid(Instruction::BitCast, C, DstTy) &&
"Invalid constantexpr bitcast!", file C:\llvm-clean\lib\IR\Constants.cpp, line

printing List[0] in emitUsed is:

 @a = addrspace(1) global [0 x i32] zeroinitializer, align 4

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/20150129/ca832939/attachment.html>

More information about the llvm-bugs mailing list