[LLVMbugs] [Bug 16878] New: Itanium Mangling wrong with unsigned integer literals passed to integer parameters

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 13 16:04:53 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16878

            Bug ID: 16878
           Summary: Itanium Mangling wrong with unsigned integer literals
                    passed to integer parameters
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: david.majnemer at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

consider:
template <int I> struct A {
};
template <int I, int J> A<I+J> f(A<I>, A<J>) {
  A<I+J> a;
  return a;
}

A<0x80000001> (*g)(A<0x80000000>, A<1>) = &f;

we mangle it like:
_Z1fILin_2D_2147483648ELi1EE1AIXplT_T0_EES0_IXT_EES0_IXT0_EE

demangles like:
A<(-_2D_2147483648)+(1)> f<-_2D_2147483648, 1>(A<-_2D_2147483648>, A<1>)

I think we should mangle it like:
_Z1fILin2147483648ELi1EE1AIXplT_T0_EES0_IXT_EES0_IXT0_EE

demangles like:
A<(-2147483648)+(1)> f<-2147483648, 1>(A<-2147483648>, A<1>)

-- 
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/20130813/eb192d94/attachment.html>


More information about the llvm-bugs mailing list