This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: bootstrap dies in gcc/toplev.c
- To: Loring Holden <lsh at cs dot brown dot edu>
- Subject: Re: bootstrap dies in gcc/toplev.c
- From: Alexandre Oliva <oliva at lsd dot ic dot unicamp dot br>
- Date: 14 Sep 1999 07:16:03 -0300
- Cc: gcc-bugs at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- References: <199909140756.DAA09077@poplar.cs.brown.edu>
On Sep 14, 1999, Loring Holden <lsh@cs.brown.edu> wrote:
> ../../egcs/gcc/toplev.c: In function `compile_file':
> ../../egcs/gcc/toplev.c:3174: structure has no member named `template'
This patch allowed me to proceed, but I'm not sure it's the right
thing to do, as get_insn_template() will abort() in some cases, but
apparently not for nop on sparc.
Index: gcc/ChangeLog
from Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* toplev.c (compile_file): Use get_insn_template to test whether a
NOP template is available.
Index: gcc/toplev.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/toplev.c,v
retrieving revision 1.220
diff -u -r1.220 toplev.c
--- gcc/toplev.c 1999/09/14 04:19:29 1.220
+++ gcc/toplev.c 1999/09/14 10:09:31
@@ -3169,10 +3169,12 @@
as gcc_compiled., if profiling. */
if (profile_flag || profile_block_flag)
{
+ const char *nop_template = get_insn_template (CODE_FOR_nop, NULL);
+
/* It's best if we can write a nop here since some
assemblers don't tolerate zeros in the text section. */
- if (insn_data[CODE_FOR_nop].template != 0)
- output_asm_insn (get_insn_template (CODE_FOR_nop, NULL), NULL_PTR);
+ if (nop_template != 0)
+ output_asm_insn (nop_template, NULL_PTR);
else
assemble_zeros (UNITS_PER_WORD);
}
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva IC-Unicamp, Bra[sz]il
oliva@{dcc.unicamp.br,guarana.{org,com}} aoliva@{acm.org,computer.org}
oliva@{gnu.org,kaffe.org,{egcs,sourceware}.cygnus.com,samba.org}
** I may forward mail about projects to mailing lists; please use them