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

           Summary: LinkModules: "alias bitcast" causes assertion failure
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Linker
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Similar to PR6925, but I think it is another issue,
to prevent clang++ -mconstructor-aliases LTO.

; a.ll
declare void @b(i8*)
@va = constant void(i8*)* @b

; b8.ll
declare void @b8(i8*)
@b = alias void(i8*)* @b8

; b32.ll
declare void @b32(i32*)
@b = alias bitcast(void (i32*)* @b32 to void (i8*)*)

$ Release+Asserts/bin/llvm-link a.ll b8.ll -o ab8
(passes)

$ Release+Asserts/bin/llvm-link a.ll b32.ll -o ab32
llvm-link: /home/chapuni/llvm/lib/VMCore/Globals.cpp:230:
llvm::GlobalAlias::GlobalAlias(const llvm::Type*,
llvm::GlobalValue::LinkageTypes, const llvm::Twine&, llvm::Constant*,
llvm::Module*): Assertion `aliasee->getType() == Ty && "Alias and aliasee types
should match!"' failed.
0  llvm-link       0x000000000058c08f
1  llvm-link       0x000000000058e352
2  libpthread.so.0 0x00000039de00eb10
3  libc.so.6       0x00000039dd430265 gsignal + 53
4  libc.so.6       0x00000039dd431d10 abort + 272
5  libc.so.6       0x00000039dd4296e6 __assert_fail + 246
6  llvm-link       0x00000000004d35f0
7  llvm-link       0x000000000044a2cb
8  llvm-link       0x000000000044d967
9  llvm-link       0x000000000040aecb main + 315
10 libc.so.6       0x00000039dd41d994 __libc_start_main + 244
11 llvm-link       0x000000000040a2f9
Stack dump:
0.      Program arguments: Release+Asserts/bin/llvm-link a.ll b32.ll -o ab32.bc
Aborted

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

Reply via email to