public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels
@ 2011-10-09 12:45 hubicka at gcc dot gnu.org
2011-10-09 13:04 ` [Bug lto/50676] " markus at trippelsdorf dot de
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-10-09 12:45 UTC (permalink / raw)
To: gcc-bugs
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: unassigned@gcc.gnu.org
ReportedBy: hubicka@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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
@ 2011-10-09 13:04 ` markus at trippelsdorf dot de
2011-10-09 13:18 ` hubicka at ucw dot cz
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-09 13:04 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markus at trippelsdorf dot
| |de
--- Comment #1 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-09 13:04:28 UTC ---
Have a look at PR50620. I can provide 30 different testcases
for this issue ;-).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
2011-10-09 13:04 ` [Bug lto/50676] " markus at trippelsdorf dot de
@ 2011-10-09 13:18 ` hubicka at ucw dot cz
2011-11-07 10:49 ` markus at trippelsdorf dot de
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hubicka at ucw dot cz @ 2011-10-09 13:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> 2011-10-09 13:17:58 UTC ---
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
2011-10-09 13:04 ` [Bug lto/50676] " markus at trippelsdorf dot de
2011-10-09 13:18 ` hubicka at ucw dot cz
@ 2011-11-07 10:49 ` markus at trippelsdorf dot de
2015-03-30 8:30 ` hubicka at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: markus at trippelsdorf dot de @ 2011-11-07 10:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
--- Comment #3 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-11-07 10:49:23 UTC ---
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'
...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
` (2 preceding siblings ...)
2011-11-07 10:49 ` markus at trippelsdorf dot de
@ 2015-03-30 8:30 ` hubicka at gcc dot gnu.org
2015-03-30 8:51 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-30 8:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andi-gcc at firstfloor dot org
--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
*** Bug 61635 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
` (3 preceding siblings ...)
2015-03-30 8:30 ` hubicka at gcc dot gnu.org
@ 2015-03-30 8:51 ` hubicka at gcc dot gnu.org
2015-07-18 17:37 ` andi-gcc at firstfloor dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-03-30 8:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-03-30
Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Patch posted https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01526.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
` (4 preceding siblings ...)
2015-03-30 8:51 ` hubicka at gcc dot gnu.org
@ 2015-07-18 17:37 ` andi-gcc at firstfloor dot org
2021-12-24 11:57 ` pinskia at gcc dot gnu.org
2021-12-24 11:57 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: andi-gcc at firstfloor dot org @ 2015-07-18 17:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
--- Comment #6 from Andi Kleen <andi-gcc at firstfloor dot org> ---
The patch doesn't seem to be checked in yet. Is there a reason for that?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
` (5 preceding siblings ...)
2015-07-18 17:37 ` andi-gcc at firstfloor dot org
@ 2021-12-24 11:57 ` pinskia at gcc dot gnu.org
2021-12-24 11:57 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-24 11:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 83375 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug lto/50676] Partitioning may fail with presence of static variables referring to function labels
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
` (6 preceding siblings ...)
2021-12-24 11:57 ` pinskia at gcc dot gnu.org
@ 2021-12-24 11:57 ` pinskia at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-24 11:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50676
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
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;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-12-24 11:57 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-09 12:45 [Bug lto/50676] New: Partitioning may fail with presence of static variables referring to function labels hubicka at gcc dot gnu.org
2011-10-09 13:04 ` [Bug lto/50676] " markus at trippelsdorf dot de
2011-10-09 13:18 ` hubicka at ucw dot cz
2011-11-07 10:49 ` markus at trippelsdorf dot de
2015-03-30 8:30 ` hubicka at gcc dot gnu.org
2015-03-30 8:51 ` hubicka at gcc dot gnu.org
2015-07-18 17:37 ` andi-gcc at firstfloor dot org
2021-12-24 11:57 ` pinskia at gcc dot gnu.org
2021-12-24 11:57 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).