From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32652 invoked by alias); 14 Jun 2007 21:05:53 -0000 Received: (qmail 32567 invoked by alias); 14 Jun 2007 21:05:43 -0000 Date: Thu, 14 Jun 2007 21:05:00 -0000 Message-ID: <20070614210543.32566.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/32296] [4.3 Regression] Bootstrap failure in stage1 on hppa*-*-* In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "dave at hiauly1 dot hia dot nrc dot ca" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-06/txt/msg01160.txt.bz2 ------- 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