[LLVMbugs] [Bug 23114] New: Usage of attribute address_space causes error in backend
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 3 03:19:22 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23114
Bug ID: 23114
Summary: Usage of attribute address_space causes error in
backend
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: svenk.public at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14144
--> https://llvm.org/bugs/attachment.cgi?id=14144&action=edit
run script
Casting to a pointer with the 'address_space' attribute causes a fatal error in
the backend.
Error message:
fatal error: error in backend: Cannot select: 0x38752a0: i64 = addrspacecast
0x3875190[0 -> 257] [ORD=8] [ID=12]
0x3875190: i64,ch = load 0x3875080, 0x3874910, 0x3874b30<LD8[%1]> [ORD=7]
[ID=11]
0x3874910: i64 = FrameIndex<0> [ID=2]
0x3874b30: i64 = undef [ID=3]
In function: func
clang-3.7: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
Example code to reproduce error:
#define FS_RELATIVE __attribute__((address_space(257)))
void func(char * p1, char * p2) {
FS_RELATIVE char * p11 = (FS_RELATIVE char *) p1; /* 01 */
*p11 = *p2;
}
Possible workaround is to introduce a cast to a non-pointer-type, i.e. replace
line marked /* 01 */ with:
FS_RELATIVE char * p11 = (FS_RELATIVE char *)(unsigned long)p1;
--
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/20150403/937501ac/attachment.html>
More information about the llvm-bugs
mailing list