Summary: | Partitioning may fail with presence of static variables referring to function labels | ||
---|---|---|---|
Product: | gcc | Reporter: | Jan Hubicka <hubicka> |
Component: | lto | Assignee: | Jan Hubicka <hubicka> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | andi-gcc, dimhen, egallager, octoploid, pageexec |
Priority: | P3 | Keywords: | patch |
Version: | 4.7.0 | ||
Target Milestone: | --- | ||
See Also: | https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50620 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2015-03-30 00:00:00 |
Description
Jan Hubicka
2011-10-09 12:44:55 UTC
Have a look at PR50620. I can provide 30 different testcases for this issue ;-). > Have a look at PR50620. I can provide 30 different testcases
> for this issue ;-).
Those are different problems (i.e. not involving labels with address taken).
I will look into that now.
Honza
Just hit the same problem today: ... /tmp/ccNz0HZT.ltrans29.ltrans.o:ccNz0HZT.ltrans29.o:function _ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.98063: error: undefined reference to '.L3709' /tmp/ccNz0HZT.ltrans29.ltrans.o:ccNz0HZT.ltrans29.o:function _ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.98063: error: undefined reference to '.L3710' /tmp/ccNz0HZT.ltrans29.ltrans.o:ccNz0HZT.ltrans29.o:function _ZZN2js9InterpretEP9JSContextPNS_10StackFrameENS_10InterpModeEE15normalJumpTable.98063: error: undefined reference to '.L3711' ... *** Bug 61635 has been marked as a duplicate of this bug. *** The patch doesn't seem to be checked in yet. Is there a reason for that? (In reply to Andi Kleen from comment #6) > The patch doesn't seem to be checked in yet. Is there a reason for that? Maybe people just forgot about it? *** Bug 83375 has been marked as a duplicate of this bug. *** Simple testcase from the other bug: /* { dg-do link } */ /* { dg-options "-flto-partition=max -flto -O2" } */ /* { dg-require-effective-target lto } */ /* Test for putting static with label references into same LTO partition */ int x, y; void f(int i) { typedef void *ptr; static ptr data[] = {&&l1,&&l2,&&l3,&&l4}; goto *data[i]; l1: x++; l2: y++; l3: x--; l4: y--; } int main(void) { f(x); return 0; } |