[Bug tree-optimization/20165] Pointer does not really escape with write

2010-10-16 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20165

Thomas Koenig  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #10 from Thomas Koenig  2010-10-16 
18:53:27 UTC ---
I think this can now be closed.


[Bug tree-optimization/20165] Pointer does not really escape with write

2010-10-16 Thread tkoenig at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20165

--- Comment #9 from Thomas Koenig  2010-10-16 
16:06:14 UTC ---
Author: tkoenig
Date: Sat Oct 16 16:06:07 2010
New Revision: 165559

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165559
Log:
2010-10-16  Thomas Koenig  

PR fortran/20165
PR fortran/31593
PR fortran/43665
* gfortran.map:  Add _gfortran_transfer_array_write,
_gfortran_transfer_array_write, _gfortran_transfer_character_write,
_gfortran_transfer_character_wide_write,
_gfortran_transfer_complex_write,
_gfortran_transfer_integer_write,
_gfortran_transfer_logical_write and
_gfortran_transfer_real_write.
* io/transfer.c (transfer_integer_write):  Add prototype and
function body as call to the original function, without the
_write.
(transfer_real_write):  Likewise.
(transfer_logical_write):  Likewise.
(transfer_character_write):  Likewise.
(transfer_character_wide_write):  Likewise.
(transfer_complex_write):  Likewise.
(transfer_array_write):  Likewise.

2010-10-16  Thomas Koenig  

PR fortran/20165
PR fortran/31593
PR fortran/43665
* trans-io.c (enum iocall): Add IOCALL_X_INTEGER_WRITE,
IOCALL_X_LOGICAL_WRITE, IOCALL_X_CHARACTER_WRITE,
IOCALL_X_CHARACTER_WIDE_WRIE, IOCALL_X_REAL_WRITE,
IOCALL_X_COMPLEX_WRITE and IOCALL_X_ARRAY_WRITE.
(gfc_build_io_library_fndecls):  Add corresponding function
decls.
(transfer_expr):  If the current transfer is a READ, use
the iocall with the original version, otherwise the version
with _WRITE.
(transfer_array_desc):  Likewise.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-io.c
trunk/libgfortran/ChangeLog
trunk/libgfortran/gfortran.map
trunk/libgfortran/io/transfer.c


[Bug tree-optimization/20165] Pointer does not really escape with write

2009-09-26 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2009-09-26 15:33 ---
Mine.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-03-05 03:09:54 |2009-09-26 15:33:38
   date||


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



[Bug tree-optimization/20165] Pointer does not really escape with write

2009-07-02 Thread rguenther at suse dot de


--- Comment #7 from rguenther at suse dot de  2009-07-02 15:46 ---
Subject: Re:  Pointer does not really escape
 with write

On Thu, 2 Jul 2009, steven at gcc dot gnu dot org wrote:

> --- Comment #6 from steven at gcc dot gnu dot org  2009-07-02 15:40 
> ---
> Dan, you mentioned a "pointer_no_escape" attribute.  What was that about?  
> I've
> never seen that mentioned before (or a patch to implement it).  Sounds like a
> cool attribute to have (and not just for Fortran, too).

There are several useful things to specify per pointer argument:

 1) whether it escapes
 2) whether pointed-to memory is read
 3) whether pointed-to memory is written to
 4) whether memory reachable from it is read
 5) whether memory reachable form it is written to
 6) whether addresses to pointed-to memory may be returned
 7) whether addresses to reachable memory may be returned

in addition to, of course, if the function reads from / writes to
global memory.

Zdenek hat a patch with some fancy attribute at some point, and
implementation-wise I'd like to have something that shares
representation with IPA-PTA results.

We do have tasks to do both IPA-PTA and the above attribute btw.

Richard.


-- 


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



[Bug tree-optimization/20165] Pointer does not really escape with write

2009-07-02 Thread steven at gcc dot gnu dot org


--- Comment #6 from steven at gcc dot gnu dot org  2009-07-02 15:40 ---
Dan, you mentioned a "pointer_no_escape" attribute.  What was that about?  I've
never seen that mentioned before (or a patch to implement it).  Sounds like a
cool attribute to have (and not just for Fortran, too).


-- 

steven at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dberlin at gcc dot gnu dot
   ||org, rguenth at gcc dot gnu
   ||dot org


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



[Bug tree-optimization/20165] Pointer does not really escape with write

2009-06-08 Thread tkoenig at gcc dot gnu dot org


--- Comment #5 from tkoenig at gcc dot gnu dot org  2009-06-08 18:12 ---
This also causes missed warnings about unitizialized variables:

$ cat foo.f
  print *,x
  end
$ gfortran -O3 -Wall -Wextra foo.f

We should have some way of marking that pointer as read-only.


-- 


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



[Bug tree-optimization/20165] Pointer does not really escape with write

2007-04-16 Thread pinskia at gcc dot gnu dot org


--- Comment #4 from pinskia at gcc dot gnu dot org  2007-04-16 22:54 ---
*** Bug 31593 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||tkoenig at gcc dot gnu dot
   ||org


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



[Bug tree-optimization/20165] Pointer does not really escape with write

2005-08-31 Thread dberlin at gcc dot gnu dot org

--- Additional Comments From dberlin at gcc dot gnu dot org  2005-08-31 
15:08 ---
These should simply be marked with pointer_no_escape once that goes in

-- 


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


[Bug tree-optimization/20165] Pointer does not really escape with write

2005-03-01 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-01 
18:11 ---
Confirmed.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Last reconfirmed|-00-00 00:00:00 |2005-03-01 18:11:59
   date||


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


[Bug tree-optimization/20165] Pointer does not really escape with write

2005-02-23 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-23 
18:59 ---
A C testcase (scanf this time):
#include 

int main(void)
{
  int i;
  int j;
  scanf("%d", &i);
  for(;i<=0;i--)
printf("H");
  return 0;
}

-- 


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