From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8451 invoked by alias); 10 Apr 2002 00:06:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 8430 invoked by uid 71); 10 Apr 2002 00:06:02 -0000 Date: Tue, 09 Apr 2002 17:06:00 -0000 Message-ID: <20020410000602.8429.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Alan Modra Subject: Re: optimization/6233: simple loop miscompilation Reply-To: Alan Modra X-SW-Source: 2002-04/txt/msg00560.txt.bz2 List-Id: The following reply was made to PR optimization/6233; it has been noted by GNATS. From: Alan Modra To: Richard Henderson , gcc-gnats@gcc.gnu.org, gcc-patches@gcc.gnu.org Cc: Subject: Re: optimization/6233: simple loop miscompilation Date: Wed, 10 Apr 2002 09:30:14 +0930 On Tue, Apr 09, 2002 at 09:41:57AM -0700, Richard Henderson wrote: > On Tue, Apr 09, 2002 at 08:57:35PM +0930, Alan Modra wrote: > > * alias.c (nonlocal_referenced_p): Make global. > > * tree.h (nonlocal_referenced_p): Declare. > > * loop.c (prescan_loop): Set has_nonconst_call for pure functions. > > This is almost certainly wrong. It sounds more like either > we've mis-categorized the function to begin with No, initial rtl looks OK (to my untrained eye) (call_insn 21 9 22 (call_placeholder 16 10 0 0 (call_insn/u 16 0 18 (set (reg:SI 0 eax) (call (mem:QI (symbol_ref:SI ("is_end_of_statement")) [0 S1 A8]) (const_int 0 [0x0]))) -1 (nil) (insn_list:REG_LIBCALL 18 (expr_list:REG_EH_REGION (const_int -1 [0xffffffff]) (nil))) (expr_list (use (mem:BLK (scratch) [0 A8])) (nil)))) -1 (nil) (nil) (nil)) >, or loop is > failing to note the USE of memory in CALL_INSN_FUNCTION_USAGE. Yes, that's what I was using nonlocal_referenced_p to find. Sledgehammer to crack a nut? Should I instead specifically search for the use_mem_scratch? -- Alan Modra IBM OzLabs - Linux Technology Centre