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]
Other format: [Raw text]

Re: [CFT] re-organize var-tracking frame_base


> On Thu, Sep 08, 2005 at 10:00:46PM -0400, John David Anglin wrote:
> > ../../gcc/gcc/libgcc2.c:1168: internal compiler error: in dbx_reg_number...
> 
> Try number 2.  This one at least builds libgcc on cross.

There are two problems in the C testsuite that appeared in my testing:

Executing on host: /test/gnu/gcc-3.3/objdir/gcc/xgcc -B/test/gnu/gcc-3.3/objdir/
gcc/   -O3 -g  -w -fno-show-column -c  -o 20031023-1.o /test/gnu/gcc-3.3/gcc/gcc
/testsuite/gcc.c-torture/compile/20031023-1.c    (timeout = 300)
/test/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/compile/20031023-1.c: In funct
ion 'baz':
/test/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/compile/20031023-1.c:54: inter
nal compiler error: in dwarf2out_frame_debug_expr, at dwarf2out.c:1580

and

Executing on host: /test/gnu/gcc-3.3/objdir/gcc/xgcc -B/test/gnu/gcc-3.3/objdir/
gcc/ /test/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.dg/20021014-1.c   -O2 -p -static -f
no-show-column  -lm   -o ./20021014-1.exe    (timeout = 300)
ld: Unsatisfied symbol "pthread_mutex_unlock" in file /test/gnu/gcc-3.3/objdir/g
cc/libgcc_eh.a[unwind-dw2-fde.o]

The first occurs as a result of this insn:

(insn/f:TI 111 110 113 /test/gnu/gcc-3.3/gcc/gcc/testsuite/gcc.c-torture/compile/20031023-1.c:42 (set (reg/f:DI 30 %r30)
        (plus:DI (reg:DI 1 %r1)
	    (reg/f:DI 30 %r30))) 158 {*pa.md:4941} (insn_list:REG_DEP_ANTI 106 (insn_list:REG_DEP_TRUE 110 (nil)))
    (expr_list:REG_DEAD (reg:DI 1 %r1)
	(nil)))

Maybe this can be fixed if the assert covers the other possibility.

I see that unwind-dw2-fde.o is required to resolve __register_frame_info.
I guess this must now occur because USE_EH_FRAME_REGISTRY is defined.

> Index: config/pa/pa.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/pa/pa.c,v
> retrieving revision 1.307
> diff -u -p -d -r1.307 pa.c
> --- config/pa/pa.c	4 Sep 2005 14:51:58 -0000	1.307
> +++ config/pa/pa.c	9 Sep 2005 05:04:32 -0000
> @@ -3326,25 +3326,9 @@ store_reg_modify (int base, int reg, HOS
>        RTX_FRAME_RELATED_P (insn) = 1;
>  
>        /* RTX_FRAME_RELATED_P must be set on each frame related set
> -	 in a parallel with more than one element.  Don't set
> -	 RTX_FRAME_RELATED_P in the first set if reg is temporary
> -	 register 1. The effect of this operation is recorded in
> -	 the initial copy.  */
> -      if (reg != 1)
> -	{
> -	  RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 0)) = 1;
> -	  RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
> -	}
> -      else
> -	{
> -	  /* The first element of a PARALLEL is always processed if it is
> -	     a SET.  Thus, we need an expression list for this case.  */
> -	  REG_NOTES (insn)
> -	    = gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
> -		gen_rtx_SET (VOIDmode, basereg,
> -			     gen_rtx_PLUS (word_mode, basereg, delta)),
> -                REG_NOTES (insn));
> -	}
> +	 in a parallel with more than one element.  */
> +      RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 0)) = 1;
> +      RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
>      }
>  }
>  
> @@ -3578,17 +3562,7 @@ hppa_expand_prologue (void)
>  	     frames.  */
>  	  insn = emit_move_insn (tmpreg, frame_pointer_rtx);
>  	  if (DO_FRAME_NOTES)
> -	    {
> -	      /* We need to record the frame pointer save here since the
> -	         new frame pointer is set in the following insn.  */
> -	      RTX_FRAME_RELATED_P (insn) = 1;
> -	      REG_NOTES (insn)
> -		= gen_rtx_EXPR_LIST (REG_FRAME_RELATED_EXPR,
> -		    gen_rtx_SET (VOIDmode,
> -				 gen_rtx_MEM (word_mode, stack_pointer_rtx),
> -			         frame_pointer_rtx),
> -		    REG_NOTES (insn));
> -	    }
> +	    RTX_FRAME_RELATED_P (insn) = 1;
>  
>  	  insn = emit_move_insn (frame_pointer_rtx, stack_pointer_rtx);
>  	  if (DO_FRAME_NOTES)

Could you explain this change?  I thought at one time we needed these
fudges.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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