This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: [Bug tree-optimization/24694] New: Address taken andaddressable variables and call clobber
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: gcc-bugzilla at gcc dot gnu dot org
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 06 Nov 2005 18:59:03 -0500
- Subject: Re: [Bug tree-optimization/24694] New: Address taken andaddressable variables and call clobber
- References: <bug-24694-6528@http.gcc.gnu.org/bugzilla/>
On Sun, 2005-11-06 at 15:46 +0000, pinskia at gcc dot gnu dot org wrote:
> Take the following code:
> int f(int);
> int g(void)
> {
> int i;
> int *iptr = &i;
> int **ipp = &iptr;
> **ipp = 1;
> f(i);
> return **ipp;
> }
> ----------
> Here we consider i being call clobber because we lose the fact that iptr is
> addressable
> but we don't look to see if its address escapes at all (which in
> this case it does not).
No, we don't actually.
In fact, that's not even close to what happens.
iptr isn't renamed, and thus, we assume the address taking of i and storage into iptr is the same as a global store,
because we know nothing about unrenamed variables.