From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9904 invoked by alias); 8 Mar 2006 19:44:00 -0000 Received: (qmail 9891 invoked by uid 22791); 8 Mar 2006 19:43:59 -0000 X-Spam-Check-By: sourceware.org Received: from ladle.dreamhost.com (HELO ladle.dreamhost.com) (205.196.219.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 08 Mar 2006 19:43:58 +0000 Received: from [192.168.1.104] (ool-44c68682.dyn.optonline.net [68.198.134.130]) by ladle.dreamhost.com (Postfix) with ESMTP id B58CB129A84; Wed, 8 Mar 2006 11:43:55 -0800 (PST) Subject: Re: [Bug tree-optimization/26608] New: address of local variables are said to escape even though it is obvious they don't From: Daniel Berlin To: gcc-bugzilla@gcc.gnu.org Cc: gcc-bugs@gcc.gnu.org In-Reply-To: References: Content-Type: text/plain Date: Wed, 08 Mar 2006 19:44:00 -0000 Message-Id: <1141847035.8501.17.camel@linux.site> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-03/txt/msg00895.txt.bz2 List-Id: On Wed, 2006-03-08 at 18:59 +0000, pinskia at gcc dot gnu dot org wrote: > Testcase: > int *d1; > int g(int *b) > { > d1 = b; > } > int f(int a, int b, int c) > { > int i, j; > int *d; > if (a) > d = &i; > else > d = &j; > i = 2; > j = 3; > g(&b); > if (i!=2) > link_error(); > if (j!=3) > link_error(); > return *d; > } > int main(void) > { > f(1, 2,3); > return 0; > } > > This should link with optimize but right now i and j are said to be call > clobbered for some reason. What does the dump say. My guess is that it believes that they are returned from the call, even though they are not. > >