[LLVMbugs] [Bug 10992] New: Symbol alias can not be undefined in a subtraction expression

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Sep 22 15:59:05 PDT 2011


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

           Summary: Symbol alias can not be undefined in a subtraction
                    expression
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: glider at google.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=7331)
 --> (http://llvm.org/bugs/attachment.cgi?id=7331)
A minimal reproducer

$ cat globals.bc 
; ModuleID = 'globals.cc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32"
target triple = "i386-apple-macosx10.6.8"

@_ZZL5IdentiE4zero = internal global { i32, [60 x i8] } zeroinitializer, align
32
@_ZZL5IdentiE4zero_asanRZ = alias internal getelementptr inbounds ({ i32, [60 x
i8] }* @_ZZL5IdentiE4zero, i32 0, i32 0)

define void @_Z3foov() nounwind ssp {
entry:
  %0 = volatile load i8* inttoptr (i32 lshr (i32 ptrtoint (i32*
@_ZZL5IdentiE4zero_asanRZ to i32), i32 3) to i8*)
  ret void
}
=======================================================

$ ../clang_build_Darwin/Release+Asserts/bin/clang globals.bc 
fatal error: error in backend: symbol '__ZZL5IdentiE4zero_asanRZ' can not be
undefined in a subtraction expression


This test case is a reduced output of the AddressSanitizer instrumentation pass
(http://code.google.com/p/address-sanitizer), which works perfectly on Linux,
so I suspect this to be a bug in Clang on Darwin. If necessary, I can provide a
more real-world example.

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



More information about the llvm-bugs mailing list