------- Comment #12 from dave at hiauly1 dot hia dot nrc dot ca  2007-06-14 
21:05 -------
Subject: Re:  [4.3 Regression] Bootstrap failure in stage1 on hppa*-*-*

> Sounds like the following patch would work:
> 
> diff -r 149399c845b5 gcc/config/pa/pa.c
> --- a/gcc/config/pa/pa.c        Tue Jun 12 15:49:27 2007 -0700
> +++ b/gcc/config/pa/pa.c        Wed Jun 13 18:37:17 2007 -0700
> @@ -4415,7 +4415,7 @@ hppa_can_use_return_insn_p (void)
>  {
>    return (reload_completed
>           && (compute_frame_size (get_frame_size (), 0) ? 0 : 1)
> -         && df_hard_reg_used_count (2) == 1
> +         && DF_REG_DEF_COUNT (2) == 0
>           && ! frame_pointer_needed);
>  }
> 
> 
> This essentially checks if r2 is ever written within the function
> (including the calls since r2 is included in the CALL_USED_REGS).

Thanks, I'll give it a try.

I had tried using current_function_is_leaf.  However, it's not working.
It seems to work for some simple test cases but a trivial return is still
being generated in at least one situation where a non trivial return
is needed.  I haven't had time to debug what's wrong.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32296

Reply via email to