public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/47259] New: LTO and global register variable
@ 2011-01-11 19:32 d.g.gorbachev at gmail dot com
2011-01-11 20:10 ` [Bug lto/47259] " d.g.gorbachev at gmail dot com
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-01-11 19:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Summary: LTO and global register variable
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 22947
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22947
Testcase
internal compiler error: in expand_expr_addr_expr_1, at expr.c:6917
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
@ 2011-01-11 20:10 ` d.g.gorbachev at gmail dot com
2011-01-12 11:22 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-01-11 20:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
--- Comment #1 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-01-11 18:47:49 UTC ---
Created attachment 22948
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22948
Backtrace
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
2011-01-11 20:10 ` [Bug lto/47259] " d.g.gorbachev at gmail dot com
@ 2011-01-12 11:22 ` rguenth at gcc dot gnu.org
2011-01-12 13:38 ` d.g.gorbachev at gmail dot com
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-12 11:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |lto
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.01.12 11:06:55
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-12 11:06:55 UTC ---
Confirmed. We probably should reject global register vars for LTO.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (2 preceding siblings ...)
2011-01-12 13:38 ` d.g.gorbachev at gmail dot com
@ 2011-01-12 13:38 ` rguenth at gcc dot gnu.org
2011-01-12 14:21 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-12 13:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-12 13:32:32 UTC ---
In 99.9999% of all cases there is a better way than using a global register
variable.
Also it is not clear to me how to merge translation units where a different
set of registers are used in global register variables. Consider
t1.c:
int g asm("%ecx");
t2.c:
void foo(void)
{
complex-asm-that-needs-many-regs
}
if we make ecx global in t2.c then we'd fail to assign registers to
the complex asm. Thus one solution would be to partition the LTO
program in a way that t1.c is completely contained in its own
partition. But then the user could have compiled t1.c without LTO
which would be my suggested workaround. Thus, emit
sorry: translation units with global register variables need to be compiled
without LTO
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
2011-01-11 20:10 ` [Bug lto/47259] " d.g.gorbachev at gmail dot com
2011-01-12 11:22 ` rguenth at gcc dot gnu.org
@ 2011-01-12 13:38 ` d.g.gorbachev at gmail dot com
2011-01-12 13:38 ` rguenth at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-01-12 13:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
--- Comment #3 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-01-12 13:10:07 UTC ---
For example, linux uses global reg var "esp". As there is no need to reserve
this register, can GCC accept it?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (3 preceding siblings ...)
2011-01-12 13:38 ` rguenth at gcc dot gnu.org
@ 2011-01-12 14:21 ` rguenth at gcc dot gnu.org
2011-01-12 15:14 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-12 14:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-12 14:01:43 UTC ---
I have a patch.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (4 preceding siblings ...)
2011-01-12 14:21 ` rguenth at gcc dot gnu.org
@ 2011-01-12 15:14 ` rguenth at gcc dot gnu.org
2011-01-12 15:22 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-12 15:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-12 15:01:16 UTC ---
Author: rguenth
Date: Wed Jan 12 15:01:09 2011
New Revision: 168713
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168713
Log:
2011-01-12 Richard Guenther <rguenther@suse.de>
PR lto/47259
* lto-streamer-out.c (output_gimple_stmt): Do not wrap
register variables in a MEM_REF.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-out.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (5 preceding siblings ...)
2011-01-12 15:14 ` rguenth at gcc dot gnu.org
@ 2011-01-12 15:22 ` rguenth at gcc dot gnu.org
2011-01-12 15:47 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-12 15:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-12 15:02:22 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (6 preceding siblings ...)
2011-01-12 15:22 ` rguenth at gcc dot gnu.org
@ 2011-01-12 15:47 ` rguenth at gcc dot gnu.org
2011-12-02 11:12 ` ubizjak at gmail dot com
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-12 15:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-12 15:22:08 UTC ---
Author: rguenth
Date: Wed Jan 12 15:21:59 2011
New Revision: 168715
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168715
Log:
2011-01-12 Richard Guenther <rguenther@suse.de>
PR lto/47259
* gcc.dg/lto/pr47259_0.c: New testcase.
* gcc.dg/lto/pr47259_1.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.dg/lto/pr47259_0.c
trunk/gcc/testsuite/gcc.dg/lto/pr47259_1.c
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (7 preceding siblings ...)
2011-01-12 15:47 ` rguenth at gcc dot gnu.org
@ 2011-12-02 11:12 ` ubizjak at gmail dot com
2011-12-02 11:25 ` [Bug lto/47259] [4.7 Regression] " ubizjak at gmail dot com
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-02 11:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #9 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-02 11:11:43 UTC ---
(In reply to comment #7)
> Fixed.
Not really ... [1]:
Executing on host: /home/uros/gcc-build/gcc/xgcc -B/home/uros/gcc-build/gcc/
c_lto_pr47259_0.o c_lto_pr47259_1.o -O2 -flto -w -o
gcc-dg-lto-pr47259-01.exe (timeout = 300)
In file included from :0:0:
/home/uros/gcc-svn/trunk/gcc/testsuite/gcc.dg/lto/pr47259_0.c:5:14: error:
invalid register name for 'r'
lto1: fatal error: errors during merging of translation units
compilation terminated.
lto-wrapper: /home/uros/gcc-build/gcc/xgcc returned 1 exit status
/usr/local/x86_64-unknown-linux-gnu/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
compiler exited with status 1
[1] http://gcc.gnu.org/ml/gcc-testresults/2011-12/msg00162.html
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] [4.7 Regression] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (8 preceding siblings ...)
2011-12-02 11:12 ` ubizjak at gmail dot com
@ 2011-12-02 11:25 ` ubizjak at gmail dot com
2011-12-02 12:15 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: ubizjak at gmail dot com @ 2011-12-02 11:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.0
Summary|LTO and global register |[4.7 Regression] LTO and
|variable |global register variable
--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2011-12-02 11:24:55 UTC ---
Testsuite failure -> 4.7 regression.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] [4.7 Regression] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (9 preceding siblings ...)
2011-12-02 11:25 ` [Bug lto/47259] [4.7 Regression] " ubizjak at gmail dot com
@ 2011-12-02 12:15 ` rguenth at gcc dot gnu.org
2011-12-02 15:50 ` rguenth at gcc dot gnu.org
2011-12-05 9:30 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-02 12:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #11 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-02 12:14:29 UTC ---
This must be a new bug, the testcase passed previously, the register name
(esi) is rejected at link-time only.
#1 0x0000000000d4dbba in make_decl_rtl (decl=0x7ffff5a2c140)
at /space/rguenther/src/svn/trunk/gcc/varasm.c:1207
1207 error ("invalid register name for %q+D", decl);
(gdb) l
1202 reg_number = decode_reg_name (asmspec);
1203 /* First detect errors in declaring global registers. */
1204 if (reg_number == -1)
1205 error ("register name not specified for %q+D", decl);
1206 else if (reg_number < 0)
1207 error ("invalid register name for %q+D", decl);
(gdb) p asmspec
$2 = 0x7ffff5b58401 "esi.2318"
we mangle the register name now. That's of course bogus. It seems we
put the global register vars into the alias machinery now? Honza?
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] [4.7 Regression] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (10 preceding siblings ...)
2011-12-02 12:15 ` rguenth at gcc dot gnu.org
@ 2011-12-02 15:50 ` rguenth at gcc dot gnu.org
2011-12-05 9:30 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-02 15:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
--- Comment #12 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-02 15:49:41 UTC ---
Author: rguenth
Date: Fri Dec 2 15:49:37 2011
New Revision: 181927
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181927
Log:
2011-12-02 Richard Guenther <rguenther@suse.de>
PR lto/47259
* ipa.c (varpool_externally_visible_p): Register variables
are always externally visible.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug lto/47259] [4.7 Regression] LTO and global register variable
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
` (11 preceding siblings ...)
2011-12-02 15:50 ` rguenth at gcc dot gnu.org
@ 2011-12-05 9:30 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-05 9:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
--- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-05 09:30:10 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-12-05 9:30 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-11 19:32 [Bug lto/47259] New: LTO and global register variable d.g.gorbachev at gmail dot com
2011-01-11 20:10 ` [Bug lto/47259] " d.g.gorbachev at gmail dot com
2011-01-12 11:22 ` rguenth at gcc dot gnu.org
2011-01-12 13:38 ` d.g.gorbachev at gmail dot com
2011-01-12 13:38 ` rguenth at gcc dot gnu.org
2011-01-12 14:21 ` rguenth at gcc dot gnu.org
2011-01-12 15:14 ` rguenth at gcc dot gnu.org
2011-01-12 15:22 ` rguenth at gcc dot gnu.org
2011-01-12 15:47 ` rguenth at gcc dot gnu.org
2011-12-02 11:12 ` ubizjak at gmail dot com
2011-12-02 11:25 ` [Bug lto/47259] [4.7 Regression] " ubizjak at gmail dot com
2011-12-02 12:15 ` rguenth at gcc dot gnu.org
2011-12-02 15:50 ` rguenth at gcc dot gnu.org
2011-12-05 9:30 ` 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).