This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/12624] Gcc failed to bootstrap on ia64
- From: "wilson at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2003 06:02:00 -0000
- Subject: [Bug target/12624] Gcc failed to bootstrap on ia64
- References: <20031015151629.12624.hjl@lucon.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12624
------- Additional Comments From wilson at gcc dot gnu dot org 2003-10-23 06:01 -------
Here is a minimal testcase.
register int foo __asm__ ("r13");
If you compile this with g++ at -O2 you get an ICE. This is trivial to
reproduce with a cross compiler to ia64-linux.
The path to here is
cp_finish_decl
make_rtl_for_nonlocal_decl
rest_of_decl_compilation
cgraph_varpool_finalize_decl
cgraph_varpool_mark_needed_node
notice_global_symbol
and it dies in the last one because it assumes DECL_RTL contains a SYMBOL_REF.
It seems simple enough to change notice_global_symbol to test for a SYMBOL_REF
instead of assuming it. A global register variable doesn't seem to be of any
use here.
The same testcase doesn't fail with the C compiler though. This is because the
C front end sets DECL_DEFER_OUTPUT, but the C++ front end does not. This causes
us to not call cgraph_varpool_finalize_decl when compiled as C code.