public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/24694]  New: Address taken and addressable variables and call clobber
@ 2005-11-06 15:46 pinskia at gcc dot gnu dot org
  2005-11-06 15:47 ` [Bug tree-optimization/24694] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-06 15:46 UTC (permalink / raw)
  To: gcc-bugs

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).


-- 
           Summary: Address taken and addressable variables and call clobber
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24694


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/24694] Address taken and addressable variables and call clobber
  2005-11-06 15:46 [Bug tree-optimization/24694] New: Address taken and addressable variables and call clobber pinskia at gcc dot gnu dot org
@ 2005-11-06 15:47 ` pinskia at gcc dot gnu dot org
  2005-11-06 16:08 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-06 15:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-06 15:47 -------
Found this while looking a little into PR 24689.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24694


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/24694] Address taken and addressable variables and call clobber
  2005-11-06 15:46 [Bug tree-optimization/24694] New: Address taken and addressable variables and call clobber pinskia at gcc dot gnu dot org
  2005-11-06 15:47 ` [Bug tree-optimization/24694] " pinskia at gcc dot gnu dot org
@ 2005-11-06 16:08 ` pinskia at gcc dot gnu dot org
  2005-11-06 23:59 ` [Bug tree-optimization/24694] New: " Daniel Berlin
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-06 16:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2005-11-06 16:08 -------
Note this is not fixed on the iab.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24694


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Bug tree-optimization/24694]  New: Address taken and addressable variables and call clobber
  2005-11-06 15:46 [Bug tree-optimization/24694] New: Address taken and addressable variables and call clobber pinskia at gcc dot gnu dot org
  2005-11-06 15:47 ` [Bug tree-optimization/24694] " pinskia at gcc dot gnu dot org
  2005-11-06 16:08 ` pinskia at gcc dot gnu dot org
@ 2005-11-06 23:59 ` Daniel Berlin
  2005-11-06 23:59 ` [Bug tree-optimization/24694] " dberlin at dberlin dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Daniel Berlin @ 2005-11-06 23:59 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

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.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/24694] Address taken and addressable variables and call clobber
  2005-11-06 15:46 [Bug tree-optimization/24694] New: Address taken and addressable variables and call clobber pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-11-06 23:59 ` [Bug tree-optimization/24694] New: " Daniel Berlin
@ 2005-11-06 23:59 ` dberlin at dberlin dot org
  2005-12-30 18:28 ` pinskia at gcc dot gnu dot org
  2009-04-22 23:09 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: dberlin at dberlin dot org @ 2005-11-06 23:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dberlin at gcc dot gnu dot org  2005-11-06 23:59 -------
Subject: Re:   New: Address taken and
        addressable variables and call clobber

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.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24694


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/24694] Address taken and addressable variables and call clobber
  2005-11-06 15:46 [Bug tree-optimization/24694] New: Address taken and addressable variables and call clobber pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-11-06 23:59 ` [Bug tree-optimization/24694] " dberlin at dberlin dot org
@ 2005-12-30 18:28 ` pinskia at gcc dot gnu dot org
  2009-04-22 23:09 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-30 18:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2005-12-30 18:28 -------
And there is a fixme in the source for this problem:
      /* FIXME: LHS is not an SSA_NAME.  Even if it's an assignment to a
         local variables we cannot be sure if it will escape, because we
         don't have information about objects not in SSA form.  Need to
         implement something along the lines of

         J.-D. Choi, M. Gupta, M. J. Serrano, V. C. Sreedhar, and S. P.
         Midkiff, ``Escape analysis for java,'' in Proceedings of the
         Conference on Object-Oriented Programming Systems, Languages, and
         Applications (OOPSLA), pp. 1-19, 1999.  */

So confirming.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |FIXME
   Last reconfirmed|0000-00-00 00:00:00         |2005-12-30 18:28:19
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24694



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/24694] Address taken and addressable variables and call clobber
  2005-11-06 15:46 [Bug tree-optimization/24694] New: Address taken and addressable variables and call clobber pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-12-30 18:28 ` pinskia at gcc dot gnu dot org
@ 2009-04-22 23:09 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-22 23:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2009-04-22 23:09 -------
This problem is harder than what is mentioned, I am going to close this as
won't fix.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24694


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-22 23:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-06 15:46 [Bug tree-optimization/24694] New: Address taken and addressable variables and call clobber pinskia at gcc dot gnu dot org
2005-11-06 15:47 ` [Bug tree-optimization/24694] " pinskia at gcc dot gnu dot org
2005-11-06 16:08 ` pinskia at gcc dot gnu dot org
2005-11-06 23:59 ` [Bug tree-optimization/24694] New: " Daniel Berlin
2005-11-06 23:59 ` [Bug tree-optimization/24694] " dberlin at dberlin dot org
2005-12-30 18:28 ` pinskia at gcc dot gnu dot org
2009-04-22 23:09 ` pinskia at gcc dot gnu dot org

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).