This is the mail archive of the gcc-patches@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]

gcc.c-torture/execute/20000818-1.c


The problem, at least as evidenced on Alpha, at -funroll-all-loops
was failing to emit a label into the insn stream, which of course
resulted in unresolved symbol references at link time.

We weren't emitting the label because we lost track of the number
of label references.



r~


        * unroll.c (copy_loop_body): Update LABEL_NUSES before
        calling invert_jump.

Index: unroll.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/unroll.c,v
retrieving revision 1.110
diff -c -p -d -r1.110 unroll.c
*** unroll.c	2000/09/18 23:19:53	1.110
--- unroll.c	2000/09/19 07:34:20
*************** copy_loop_body (loop, copy_start, copy_e
*** 2050,2059 ****
  	  if (JUMP_LABEL (insn) == start_label && insn == copy_end
  	      && ! last_iteration)
  	    {
! 	      /* Update JUMP_LABEL correctly to make invert_jump working.  */
  	      JUMP_LABEL (copy) = get_label_from_map (map,
  						      CODE_LABEL_NUMBER
  						      (JUMP_LABEL (insn)));
  	      /* This is a branch to the beginning of the loop; this is the
  		 last insn being copied; and this is not the last iteration.
  		 In this case, we want to change the original fall through
--- 2050,2061 ----
  	  if (JUMP_LABEL (insn) == start_label && insn == copy_end
  	      && ! last_iteration)
  	    {
! 	      /* Update JUMP_LABEL make invert_jump work correctly.  */
  	      JUMP_LABEL (copy) = get_label_from_map (map,
  						      CODE_LABEL_NUMBER
  						      (JUMP_LABEL (insn)));
+ 	      LABEL_NUSES (JUMP_LABEL (copy))++;
+ 
  	      /* This is a branch to the beginning of the loop; this is the
  		 last insn being copied; and this is not the last iteration.
  		 In this case, we want to change the original fall through

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