This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: bootstrap failure

[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;
  	}
  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]