public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Daniel Berlin <dberlin@dberlin.org>
To: gcc-bugzilla@gcc.gnu.org
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: [Bug tree-optimization/26608]  New: address of local variables 	are said to escape even though it is obvious they don't
Date: Wed, 08 Mar 2006 19:44:00 -0000	[thread overview]
Message-ID: <1141847035.8501.17.camel@linux.site> (raw)
In-Reply-To: <bug-26608-6528@http.gcc.gnu.org/bugzilla/>

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.

> 
> 


  parent reply	other threads:[~2006-03-08 19:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08 18:59 pinskia at gcc dot gnu dot org
2006-03-08 19:44 ` [Bug tree-optimization/26608] " dberlin at dberlin dot org
2006-03-08 19:44 ` Daniel Berlin [this message]
2006-03-08 19:47 ` pinskia at gcc dot gnu dot org
2006-09-12  6:37 ` pinskia at gcc dot gnu dot org
2009-04-03 12:24 ` rguenth at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1141847035.8501.17.camel@linux.site \
    --to=dberlin@dberlin.org \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=gcc-bugzilla@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).