public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47286] New: Invalid code when using register ... asm
@ 2011-01-14 0:10 anton at samba dot org
2011-01-14 11:03 ` [Bug tree-optimization/47286] " rguenth at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: anton at samba dot org @ 2011-01-14 0:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47286
Summary: Invalid code when using register ... asm
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: anton@samba.org
Target: powerpc64-unknown-linux-gnu
A gcc build from yesterday (4.6.0 20110113) fails when building a ppc64 Linux
kernel. A cut down testcase:
struct thread_info {
int preempt_count;
};
static inline struct thread_info *current_thread_info(void)
{
register struct thread_info *sp asm("r1");
return sp;
}
void testcase(void)
{
current_thread_info()->preempt_count += 1;
}
compiled with -O2:
# gcc -O2 -S testcase.s
has the add optimised away:
.L.testcase:
blr
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/47286] Invalid code when using register ... asm
2011-01-14 0:10 [Bug tree-optimization/47286] New: Invalid code when using register ... asm anton at samba dot org
@ 2011-01-14 11:03 ` rguenth at gcc dot gnu.org
2011-01-14 11:07 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-14 11:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47286
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.01.14 10:34:35
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 10:34:35 UTC ---
Confirmed. points-to analysis computes sp as pointing to nothing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/47286] Invalid code when using register ... asm
2011-01-14 0:10 [Bug tree-optimization/47286] New: Invalid code when using register ... asm anton at samba dot org
2011-01-14 11:03 ` [Bug tree-optimization/47286] " rguenth at gcc dot gnu.org
@ 2011-01-14 11:07 ` rguenth at gcc dot gnu.org
2011-01-14 12:32 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-14 11:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47286
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Known to fail| |4.5.2, 4.6.0
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 10:59:46 UTC ---
The fundamental problem is present on all branches, we are lucky in 4.4 and
earlier though.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/47286] Invalid code when using register ... asm
2011-01-14 0:10 [Bug tree-optimization/47286] New: Invalid code when using register ... asm anton at samba dot org
2011-01-14 11:03 ` [Bug tree-optimization/47286] " rguenth at gcc dot gnu.org
2011-01-14 11:07 ` rguenth at gcc dot gnu.org
@ 2011-01-14 12:32 ` rguenth at gcc dot gnu.org
2011-01-17 11:35 ` rguenth at gcc dot gnu.org
2011-01-17 11:44 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-14 12:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47286
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-14 12:15:48 UTC ---
Author: rguenth
Date: Fri Jan 14 12:15:43 2011
New Revision: 168779
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168779
Log:
2011-01-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47286
* tree-ssa-structalias.c (new_var_info): Register variables
are global.
* gcc.dg/tree-ssa/pr47286.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr47286.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-structalias.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/47286] Invalid code when using register ... asm
2011-01-14 0:10 [Bug tree-optimization/47286] New: Invalid code when using register ... asm anton at samba dot org
` (2 preceding siblings ...)
2011-01-14 12:32 ` rguenth at gcc dot gnu.org
@ 2011-01-17 11:35 ` rguenth at gcc dot gnu.org
2011-01-17 11:44 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-17 11:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47286
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-17 11:31:15 UTC ---
Author: rguenth
Date: Mon Jan 17 11:31:10 2011
New Revision: 168894
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168894
Log:
2011-01-17 Richard Guenther <rguenther@suse.de>
Backport from mainline
PR tree-optimization/47286
* tree-ssa-structalias.c (new_var_info): Register variables
are global.
* gcc.dg/tree-ssa/pr47286.c: New testcase.
PR tree-optimization/44592
* tree-ssa-ccp.c (gimplify_and_update_call_from_tree): Copy
from trunk.
* gfortran.dg/pr44592.f90: New testcase.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tree-ssa/pr47286.c
branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/pr44592.f90
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/tree-ssa-ccp.c
branches/gcc-4_5-branch/gcc/tree-ssa-structalias.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/47286] Invalid code when using register ... asm
2011-01-14 0:10 [Bug tree-optimization/47286] New: Invalid code when using register ... asm anton at samba dot org
` (3 preceding siblings ...)
2011-01-17 11:35 ` rguenth at gcc dot gnu.org
@ 2011-01-17 11:44 ` rguenth at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-01-17 11:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47286
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.5.3
Resolution| |FIXED
Target Milestone|--- |4.5.3
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-17 11:33:48 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-17 11:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-14 0:10 [Bug tree-optimization/47286] New: Invalid code when using register ... asm anton at samba dot org
2011-01-14 11:03 ` [Bug tree-optimization/47286] " rguenth at gcc dot gnu.org
2011-01-14 11:07 ` rguenth at gcc dot gnu.org
2011-01-14 12:32 ` rguenth at gcc dot gnu.org
2011-01-17 11:35 ` rguenth at gcc dot gnu.org
2011-01-17 11:44 ` 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).