http://llvm.org/bugs/show_bug.cgi?id=14058
Bug #: 14058
Summary: Broken Attribute Maniuplation:
AttrListPtr::{addAttr,removeAttr} erroneously update
attribute set
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Created attachment 9329
--> http://llvm.org/bugs/attachment.cgi?id=9329
C++ Testcase
Problem is with the new dual-encoding of attributes (as simple enum, and for
now internally as bitvector), and it looks like AttrListPtr (stores attributes
for a function) uses the wrong values to update what should be the
bitvector-friendly encoding.
For example, Attributes::StructRect is 25, but is represented internally as (1
<< 4). The error happens when AttrListPtr uses '25' to update the bitvector
version, leading to all kinds of wrong results.
C++ API testcase attached, let me know if you have any trouble or questions
running it.
Output of testcase (as of earlier today):
declare internal void @Test(i16)
declare internal void @Test(i16 zeroext signext inreg sret)
ArgAttr:
/home/wdietz2/llvm/32-src/projects/jitflow/tools/argattr/ArgAttrTest.cpp:27:
int main(): Assertion
`!F->getParamAttributes(1).hasAttribute(Attributes::StructRet)' failed.
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs