[Bug target/12624] Gcc failed to bootstrap on ia64
wilson at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Oct 23 06:15:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list