public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-20165-6528@http.gcc.gnu.org/bugzilla/>]
* [Bug tree-optimization/20165] New: Pointer does not really escape with write
@ 2005-02-23 18:21 pinskia at gcc dot gnu dot org
  2005-02-23 23:29 ` [Bug tree-optimization/20165] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-23 18:21 UTC (permalink / raw)
  To: gcc-bugs

Take the following fortran code (were we know that write does not make the pointer escape):
      program main
      dimension x(10)
      write(3)n,(x(n),n=1,10)
      end

in the last tree dump we get:
  _gfortran_transfer_integer (&n, 4);
  n = 1;

<L0>:;
  _gfortran_transfer_real (&x[n + -1], 4);
  n.3 = n;
  n = n.3 + 1;
  if (n.3 == 10) goto <L4>; else goto <L0>;

See how n is marked as not a gimple variable which causes us to store it on the stack.  Even though we 
know that _gfortran_transfer_real will not cause the pointer to escape.  There should be a new attribute 
to mark functions as causing pointers not to escape at all.

-- 
           Summary: Pointer does not really escape with write
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2010-10-16 18:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-20165-4@http.gcc.gnu.org/bugzilla/>
2010-10-16 16:06 ` [Bug tree-optimization/20165] Pointer does not really escape with write tkoenig at gcc dot gnu.org
2010-10-16 18:53 ` tkoenig at gcc dot gnu.org
     [not found] <bug-20165-6528@http.gcc.gnu.org/bugzilla/>
2007-04-16 21:54 ` pinskia at gcc dot gnu dot org
2009-06-08 18:12 ` tkoenig at gcc dot gnu dot org
2009-07-02 15:40 ` steven at gcc dot gnu dot org
2009-07-02 15:47 ` rguenther at suse dot de
2009-09-26 15:33 ` rguenth at gcc dot gnu dot org
2005-02-23 18:21 [Bug tree-optimization/20165] New: " pinskia at gcc dot gnu dot org
2005-02-23 23:29 ` [Bug tree-optimization/20165] " pinskia at gcc dot gnu dot org
2005-03-01 18:12 ` pinskia at gcc dot gnu dot org
2005-08-31 15:09 ` dberlin 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).