[LLVMbugs] [Bug 13163] New: BlockAddress instruction with use from the global context is damaged during module link?

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 21 02:46:36 PDT 2012


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

             Bug #: 13163
           Summary: BlockAddress instruction with use from the global
                    context is damaged during module link?
           Product: Runtime Libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: other
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: yuri at tsoft.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 8737
  --> http://llvm.org/bugs/attachment.cgi?id=8737
C++ code generating the testcase and illustrating the problem

I have a module having the blockaddress instruction.
When I link it into another module and delete the original, blockaddress 
disappears and is replaced by inttoptr (i32 1 to i8*).

Please compile and run the attached program to see the demo of this 
problem.

Right after linking modules, blockaddress still exists:
@switch.bbs = internal global [3 x i8*] [i8* blockaddress(@my_func, 
%switch.body.begin), i8* blockaddress(@my_func, %switch.body.begin1), 
i8* inttoptr (i32 1 to i8*)]
But once the original module is deleted, the same line in destination is 
replaced by the one with inttoptr:
@switch.bbs = internal global [3 x i8*] [i8* inttoptr (i32 1 to i8*), 
i8* inttoptr (i32 1 to i8*), i8* inttoptr (i32 1 to i8*)]

It looks like BlockAddress instruction isn't transferred correctly into the
destination module.

rev.158596

Yuri

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