public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16496] New: IMA changes break linux kernel compile (register vars)
@ 2004-07-12 13:19 matz at suse dot de
2004-07-12 13:27 ` [Bug c/16496] " rearnsha at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: matz at suse dot de @ 2004-07-12 13:19 UTC (permalink / raw)
To: gcc-bugs
Using current HEAD when compiling this:
----------------------------------
register int *current asm ("r2");
int f()
{
return *current;
}
----------------------------------
we get this error:
% ./gcc/cc1 -O2 -quiet r2-test.i
r2-test.i: In function `f':
r2-test.i:1: error: register name not specified for 'current'
This was working before. A CVS hunt identifies this timeframe:
cvs diff -D "2004-07-08 2000" -D "2004-07-08 2200" ChangeLog, which are Zacks
patches:
+2004-07-08 Zack Weinberg <zack@codesourcery.com>
+
+ * c-decl.c (static_ctors, static_dtors): Make static.
+ (pop_file_scope): Call c_common_write_pch and
....
+2004-07-08 Zack Weinberg <zack@codesourcery.com>
+
+ * c-decl.c (pop_scope): Do not set DECL_CONTEXT on file-scope
+ decls when there is only one input translation unit.
What happens is, that the DECL for 'current' is created twice. First when
parsing the declaration with the correct asmspec "r2". And a second time
when called again from DECL_RTL macro, because ->decl.rtl was reset in the
meantime. This reset happens in check_global_declarations, because of
if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
&& ! TREE_ASM_WRITTEN (decl))
SET_DECL_RTL (decl, NULL_RTX);
This is called _before_ cgraph_optimize() after Zacks patches. But this
compiles the function (and thereby tests the asmspec of the above decl,
which meanwhile got reset) and therefore emits the error.
--
Summary: IMA changes break linux kernel compile (register vars)
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: zack at codesourcery dot com
ReportedBy: matz at suse dot de
CC: gcc-bugs at gcc dot gnu dot org,olh at suse dot de
GCC host triplet: powerpc-linux
GCC target triplet: powerpc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16496
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/16496] IMA changes break linux kernel compile (register vars)
2004-07-12 13:19 [Bug c/16496] New: IMA changes break linux kernel compile (register vars) matz at suse dot de
@ 2004-07-12 13:27 ` rearnsha at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2004-07-12 13:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rearnsha at gcc dot gnu dot org 2004-07-12 13:27 -------
*** This bug has been marked as a duplicate of 16452 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16496
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-07-12 13:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-12 13:19 [Bug c/16496] New: IMA changes break linux kernel compile (register vars) matz at suse dot de
2004-07-12 13:27 ` [Bug c/16496] " rearnsha at gcc dot gnu dot 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).