This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bootstrap failure
- To: Tom Tromey <tromey at redhat dot com>
- Subject: Re: bootstrap failure
- From: Richard Henderson <rth at redhat dot com>
- Date: Tue, 13 Nov 2001 16:40:55 -0800
- Cc: Jakub Jelinek <jakub at redhat dot com>, GCC Hackers <gcc at gcc dot gnu dot org>
- References: <878zda37po.fsf@creche.redhat.com>
[Get raw message]
On Tue, Nov 13, 2001 at 10:24:03AM -0700, Tom Tromey wrote:
> What is happening is that the first abort() in make_decl_rtl is being
> triggered. This happens because dw2_force_const_mem() passes
> generates a VAR_DECL (the !USE_LINKONCE_INDIRECT branch) which is not
> static, not public, not external, and not a register.
>
> As a hack I changed dw2_force_const_mem to set TREE_STATIC on the
> VAR_DECL. I have no idea whether this will work.
That's about right. I've committed this.
r~
* dwarf2asm.c (dw2_force_const_mem): Set PUBLIC or STATIC
as appropriate for the artificial decl.
Index: dwarf2asm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/dwarf2asm.c,v
retrieving revision 1.20
diff -c -p -d -r1.20 dwarf2asm.c
*** dwarf2asm.c 2001/11/09 23:18:56 1.20
--- dwarf2asm.c 2001/11/14 00:39:02
*************** dw2_force_const_mem (x)
*** 791,796 ****
--- 791,797 ----
id = get_identifier (ref_name);
decl = build_decl (VAR_DECL, id, ptr_type_node);
DECL_ARTIFICIAL (decl) = 1;
+ TREE_PUBLIC (decl) = 1;
DECL_INITIAL (decl) = decl;
make_decl_one_only (decl);
}
*************** dw2_force_const_mem (x)
*** 804,809 ****
--- 805,811 ----
id = get_identifier (label);
decl = build_decl (VAR_DECL, id, ptr_type_node);
DECL_ARTIFICIAL (decl) = 1;
+ TREE_STATIC (decl) = 1;
DECL_INITIAL (decl) = decl;
}