public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [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; 4+ 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] 4+ messages in thread
* [Bug tree-optimization/20165] Pointer does not really escape with write
2005-02-23 18:21 [Bug tree-optimization/20165] New: Pointer does not really escape with write pinskia at gcc dot gnu dot org
@ 2005-02-23 23:29 ` 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
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-23 23:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-23 18:59 -------
A C testcase (scanf this time):
#include <stdio.h>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/20165] Pointer does not really escape with write
2005-02-23 18:21 [Bug tree-optimization/20165] New: Pointer does not really escape with write 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
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-01 18:12 UTC (permalink / raw)
To: gcc-bugs
------- 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|0000-00-00 00:00:00 |2005-03-01 18:11:59
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20165
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/20165] Pointer does not really escape with write
2005-02-23 18:21 [Bug tree-optimization/20165] New: Pointer does not really escape with write 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
2 siblings, 0 replies; 4+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-08-31 15:09 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-08-31 15:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 18:21 [Bug tree-optimization/20165] New: Pointer does not really escape with write 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).