public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files
@ 2011-01-06 13:15 d.g.gorbachev at gmail dot com
2011-01-06 13:28 ` Jan Hubicka
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-01-06 13:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
Summary: Undefined reference errors when combining IR and
non-IR object files
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: d.g.gorbachev@gmail.com
Created attachment 22912
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22912
Testcase
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
@ 2011-01-06 13:28 ` Jan Hubicka
2011-01-06 13:31 ` [Bug lto/47188] " hubicka at ucw dot cz
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Jan Hubicka @ 2011-01-06 13:28 UTC (permalink / raw)
To: d.g.gorbachev at gmail dot com; +Cc: gcc-bugs
The bug seems to be that lto-symtab incorrectly sets resolution info of the callgraph node as unknown. Looking into it.
Honza
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
2011-01-06 13:28 ` Jan Hubicka
@ 2011-01-06 13:31 ` hubicka at ucw dot cz
2011-01-06 13:44 ` Jan Hubicka
2011-01-06 14:04 ` Jan Hubicka
2011-01-06 13:44 ` hubicka at ucw dot cz
` (4 subsequent siblings)
6 siblings, 2 replies; 10+ messages in thread
From: hubicka at ucw dot cz @ 2011-01-06 13:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
--- Comment #1 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-06 13:18:03 UTC ---
The bug seems to be that lto-symtab incorrectly sets resolution info of the
callgraph node as unknown. Looking into it.
Honza
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:31 ` [Bug lto/47188] " hubicka at ucw dot cz
@ 2011-01-06 13:44 ` Jan Hubicka
2011-01-06 14:04 ` Jan Hubicka
1 sibling, 0 replies; 10+ messages in thread
From: Jan Hubicka @ 2011-01-06 13:44 UTC (permalink / raw)
To: hubicka at ucw dot cz; +Cc: gcc-bugs
This is driver bug. With -flto-partition=none it for whatever reason forgets about -fresolution:
../lto1 -quiet -dumpdir ./ -dumpbase prog -mtune=generic -march=x86-64 -auxbase-strip /tmp/cctgIO6R.lto.o -version -flto-partition=none -fuse-linker-plugin -fwhole-program -fdump-ipa-all-details @/tmp/ccpDD04R -o foo.s
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
2011-01-06 13:28 ` Jan Hubicka
2011-01-06 13:31 ` [Bug lto/47188] " hubicka at ucw dot cz
@ 2011-01-06 13:44 ` hubicka at ucw dot cz
2011-01-06 14:07 ` hubicka at ucw dot cz
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: hubicka at ucw dot cz @ 2011-01-06 13:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-06 13:31:36 UTC ---
This is driver bug. With -flto-partition=none it for whatever reason forgets
about -fresolution:
../lto1 -quiet -dumpdir ./ -dumpbase prog -mtune=generic -march=x86-64
-auxbase-strip /tmp/cctgIO6R.lto.o -version -flto-partition=none
-fuse-linker-plugin -fwhole-program -fdump-ipa-all-details @/tmp/ccpDD04R -o
foo.s
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:31 ` [Bug lto/47188] " hubicka at ucw dot cz
2011-01-06 13:44 ` Jan Hubicka
@ 2011-01-06 14:04 ` Jan Hubicka
1 sibling, 0 replies; 10+ messages in thread
From: Jan Hubicka @ 2011-01-06 14:04 UTC (permalink / raw)
To: hubicka at ucw dot cz; +Cc: gcc-bugs
The problem is that collect2 should be in LTO_MODE_NONE when plugin is used but
it confuses itself and sets itself into LTO_MODE_LTO. Consequently compilation
is done twice, once correctly with plugin and then once again with collect2
path.
I am testing the attached patch. It will also make non-WHOPR mode twice as fast ;))
Honza
Index: collect2.c
===================================================================
--- collect2.c (revision 168508)
+++ collect2.c (working copy)
@@ -1236,7 +1236,7 @@ main (int argc, char **argv)
#endif
}
vflag = debug;
- if (no_partition)
+ if (no_partition && lto_mode == LTO_MODE_WHOPR)
lto_mode = LTO_MODE_LTO;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
` (2 preceding siblings ...)
2011-01-06 13:44 ` hubicka at ucw dot cz
@ 2011-01-06 14:07 ` hubicka at ucw dot cz
2011-01-06 14:50 ` d.g.gorbachev at gmail dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: hubicka at ucw dot cz @ 2011-01-06 14:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> 2011-01-06 13:44:09 UTC ---
The problem is that collect2 should be in LTO_MODE_NONE when plugin is used but
it confuses itself and sets itself into LTO_MODE_LTO. Consequently compilation
is done twice, once correctly with plugin and then once again with collect2
path.
I am testing the attached patch. It will also make non-WHOPR mode twice as
fast ;))
Honza
Index: collect2.c
===================================================================
--- collect2.c (revision 168508)
+++ collect2.c (working copy)
@@ -1236,7 +1236,7 @@ main (int argc, char **argv)
#endif
}
vflag = debug;
- if (no_partition)
+ if (no_partition && lto_mode == LTO_MODE_WHOPR)
lto_mode = LTO_MODE_LTO;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
` (3 preceding siblings ...)
2011-01-06 14:07 ` hubicka at ucw dot cz
@ 2011-01-06 14:50 ` d.g.gorbachev at gmail dot com
2011-01-06 18:55 ` hubicka at gcc dot gnu.org
2011-01-11 12:15 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 10+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-01-06 14:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
--- Comment #4 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-01-06 14:45:17 UTC ---
Collect2-based LTO (when CFLAGS = -flto -fwhole-program) fails, too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
` (4 preceding siblings ...)
2011-01-06 14:50 ` d.g.gorbachev at gmail dot com
@ 2011-01-06 18:55 ` hubicka at gcc dot gnu.org
2011-01-11 12:15 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-01-06 18:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-06 18:50:22 UTC ---
Author: hubicka
Date: Thu Jan 6 18:50:20 2011
New Revision: 168548
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168548
Log:
PR lto/47188
* collect2.c (main): Do not enable LTOmode when plugin is active.
* testsuite/gcc.dg/lto/pr47188_0.c: New testcase.
* testsuite/gcc.dg/lto/pr47188_1.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/lto/pr47188_0.c
trunk/gcc/testsuite/gcc.dg/lto/pr47188_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/collect2.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug lto/47188] Undefined reference errors when combining IR and non-IR object files
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
` (5 preceding siblings ...)
2011-01-06 18:55 ` hubicka at gcc dot gnu.org
@ 2011-01-11 12:15 ` rguenth at gcc dot gnu.org
6 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-11 12:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47188
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-11 12:11:18 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-01-11 12:11 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-06 13:15 [Bug lto/47188] New: Undefined reference errors when combining IR and non-IR object files d.g.gorbachev at gmail dot com
2011-01-06 13:28 ` Jan Hubicka
2011-01-06 13:31 ` [Bug lto/47188] " hubicka at ucw dot cz
2011-01-06 13:44 ` Jan Hubicka
2011-01-06 14:04 ` Jan Hubicka
2011-01-06 13:44 ` hubicka at ucw dot cz
2011-01-06 14:07 ` hubicka at ucw dot cz
2011-01-06 14:50 ` d.g.gorbachev at gmail dot com
2011-01-06 18:55 ` hubicka at gcc dot gnu.org
2011-01-11 12:15 ` rguenth 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).