This is the mail archive of the 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]
Other format: [Raw text]

[committed] Fix frv-elf build

This patch fixes an frv-elf build failure in libstdc++-v3.

We had a VLIW packet that needed no "nop" instructions (the usual case)
but frv_packet.groups[GROUP_I].nop still pointed to a nop that was used
when compiling an earlier function.  That wouldn't normally matter,
except for the following sanity check:

	  /* frv_reorg should have added nops for us.  */
	  if (packet_group->sorted[cursor[group]] == packet_group->nop)
	    abort ();

In the failing testcase, the old nop had been reclaimed by the garbage
collector and the memory happened to point to one of the instructions
in the current packet.  The test above would then spuriously fail.

Fixed by setting "nop" to null when no nops are needed.  Tested on
frv-elf, where it fixes the build failure.  Applied as obvious.


	* config/frv/frv.c (frv_sort_insn_group): Always initialize

Index: config/frv/frv.c
RCS file: /cvs/gcc/gcc/gcc/config/frv/frv.c,v
retrieving revision 1.75
diff -c -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.75 frv.c
*** config/frv/frv.c	26 Nov 2004 18:53:47 -0000	1.75
--- config/frv/frv.c	8 Dec 2004 10:06:21 -0000
*************** frv_sort_insn_group (enum frv_insn_group
*** 8921,8926 ****
--- 8921,8930 ----
    size_t dfa_size;
    packet_group = &frv_packet.groups[group];
+   /* Assume no nop is needed.  */
+   packet_group->nop = 0;
    if (packet_group->num_insns == 0)

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