http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676

             Bug #: 50676
           Summary: Partitioning may fail with presence of static
                    variables referring to function labels
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: hubi...@gcc.gnu.org


Noticed the bug while preparing -fno-topelvel-reorder patch for Andi.
With WIP version of patch I got following failure building Mozilla:
/tmp/ccPpJShB.ltrans29.ltrans.o:ccPpJShB.ltrans29.o:function
_ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.7094572:
error: undefined reference to
+'.L79667'                                                                      
/tmp/ccPpJShB.ltrans29.ltrans.o:ccPpJShB.ltrans29.o:function
_ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.7094572:
error: undefined reference to
+'.L79668'                                                                      
/tmp/ccPpJShB.ltrans29.ltrans.o:ccPpJShB.ltrans29.o:function
_ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.7094572:
error: undefined reference to
+'.L79669'                                                                      
/tmp/ccPpJShB.ltrans29.ltrans.o:ccPpJShB.ltrans29.o:function
_ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.7094572:
error: undefined reference to
+'.L79670'                                                                      
/tmp/ccPpJShB.ltrans29.ltrans.o:ccPpJShB.ltrans29.o:function
_ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.7094572:
error: undefined reference to
+'.L79671' 

We will need artificial testcase for that that is bit tricky because it
involves putting function into one partition and its local static variable into
another, but clearly ipa-reference is not recording the cases where address of
local label is taken and thus partitioning happily breaks such code.

Honza

Reply via email to