public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail
@ 2008-03-27 16:01 dick dot hendrickson at gmail dot com
2008-03-27 16:50 ` [Bug fortran/35718] " burnus at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: dick dot hendrickson at gmail dot com @ 2008-03-27 16:01 UTC (permalink / raw)
To: gcc-bugs
The following program fails to raise an error condition in the deallocate
statement. The pointer target was not created by an allocate.
Dick Hendrickson
program MF0069
! fails on Windows XP
! gcc version 4.4.0 20080312 (experimental) [trunk revision 133139]
! F95 page 83, line 34 says deallocating a pointer whose target
!wasn't created by an ALLOCATE causes error condition
REAL, pointer :: RLA(:)
REAL, TARGET :: RLA1(6)
RLA1 = 0
RLA => RLA1
DEALLOCATE (RLA, STAT = ISTAT)
IF (ISTAT .LE. 0) print *, 'deallocate did not fail!', istat
END
--
Summary: deallocating non-allocated pointer target does not fail
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dick dot hendrickson at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
2008-03-27 16:01 [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail dick dot hendrickson at gmail dot com
@ 2008-03-27 16:50 ` burnus at gcc dot gnu dot org
2008-04-13 20:59 ` tkoenig at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-03-27 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2008-03-27 16:50 -------
Confirmed. gfortran deallocates the static memory as valgrind also complains:
==3839== Invalid free() / delete / delete[]
==3839== at 0x4C2430F: free (in
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==3839== by 0x4008F2: MAIN__ (aaa.f90:12)
==3839== by 0x4009BB: main (fmain.c:21)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2008-03-27 16:50:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
2008-03-27 16:01 [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail dick dot hendrickson at gmail dot com
2008-03-27 16:50 ` [Bug fortran/35718] " burnus at gcc dot gnu dot org
@ 2008-04-13 20:59 ` tkoenig at gcc dot gnu dot org
2008-08-08 21:14 ` jv244 at cam dot ac dot uk
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-04-13 20:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tkoenig at gcc dot gnu dot org 2008-04-13 20:58 -------
Ouch. That one will be hard to fix without keeping
state around in the descriptor.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
2008-03-27 16:01 [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail dick dot hendrickson at gmail dot com
2008-03-27 16:50 ` [Bug fortran/35718] " burnus at gcc dot gnu dot org
2008-04-13 20:59 ` tkoenig at gcc dot gnu dot org
@ 2008-08-08 21:14 ` jv244 at cam dot ac dot uk
2008-09-28 19:55 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: jv244 at cam dot ac dot uk @ 2008-08-08 21:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jv244 at cam dot ac dot uk 2008-08-08 21:13 -------
works correctly with e.g. ifort and xlf90, so worth fixing somehow.
--
jv244 at cam dot ac dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
2008-03-27 16:01 [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail dick dot hendrickson at gmail dot com
` (2 preceding siblings ...)
2008-08-08 21:14 ` jv244 at cam dot ac dot uk
@ 2008-09-28 19:55 ` pault at gcc dot gnu dot org
2008-11-06 6:24 ` pault at gcc dot gnu dot org
2009-04-06 10:56 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-09-28 19:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pault at gcc dot gnu dot org 2008-09-28 19:54 -------
(In reply to comment #3)
> works correctly with e.g. ifort and xlf90, so worth fixing somehow.
>
Thomas' #2 is correct - see the present discussion on the list.
I think that we have to bite the bullet and change the API.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
2008-03-27 16:01 [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail dick dot hendrickson at gmail dot com
` (3 preceding siblings ...)
2008-09-28 19:55 ` pault at gcc dot gnu dot org
@ 2008-11-06 6:24 ` pault at gcc dot gnu dot org
2009-04-06 10:56 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-11-06 6:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2008-11-06 06:23 -------
Hold this one to 4.5 since it needs the array descriptor reform.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |SUSPENDED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
2008-03-27 16:01 [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail dick dot hendrickson at gmail dot com
` (4 preceding siblings ...)
2008-11-06 6:24 ` pault at gcc dot gnu dot org
@ 2009-04-06 10:56 ` pault at gcc dot gnu dot org
5 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-04-06 10:56 UTC (permalink / raw)
To: gcc-bugs
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|SUSPENDED |ASSIGNED
Last reconfirmed|2008-03-27 16:50:00 |2009-04-06 10:55:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
[not found] <bug-35718-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-12-10 16:03 ` pault at gcc dot gnu.org
@ 2020-12-11 18:00 ` dominiq at lps dot ens.fr
3 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-12-11 18:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |NEW
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
[not found] <bug-35718-4@http.gcc.gnu.org/bugzilla/>
2020-06-14 14:54 ` tkoenig at gcc dot gnu.org
2020-06-14 15:10 ` tkoenig at gcc dot gnu.org
@ 2020-12-10 16:03 ` pault at gcc dot gnu.org
2020-12-11 18:00 ` dominiq at lps dot ens.fr
3 siblings, 0 replies; 11+ messages in thread
From: pault at gcc dot gnu.org @ 2020-12-10 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|pault at gcc dot gnu.org |unassigned at gcc dot gnu.org
--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #8)
> We have an unsigned short in our descriptor that we can use
> for keeping track of what we allocated and where.
>
> So, we have 16 bits. State we can keep around is:
>
> Type of descriptor: Allocatable, pointer, passed argument. 2 bits.
>
> Associated: No, allocated, target. 2 bits.
>
> Contiguous: 1 bit.
>
> Anything else we would need? That would still leave us 11 bit in reserve.
Hi Thomas,
That was the intention of the field in the descriptor. I just never got round
to it.
I have unassigned myself since I have a huge backlog of other issues.
Cheers
Paul
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
[not found] <bug-35718-4@http.gcc.gnu.org/bugzilla/>
2020-06-14 14:54 ` tkoenig at gcc dot gnu.org
@ 2020-06-14 15:10 ` tkoenig at gcc dot gnu.org
2020-12-10 16:03 ` pault at gcc dot gnu.org
2020-12-11 18:00 ` dominiq at lps dot ens.fr
3 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-06-14 15:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
We have an unsigned short in our descriptor that we can use
for keeping track of what we allocated and where.
So, we have 16 bits. State we can keep around is:
Type of descriptor: Allocatable, pointer, passed argument. 2 bits.
Associated: No, allocated, target. 2 bits.
Contiguous: 1 bit.
Anything else we would need? That would still leave us 11 bit in reserve.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug fortran/35718] deallocating non-allocated pointer target does not fail
[not found] <bug-35718-4@http.gcc.gnu.org/bugzilla/>
@ 2020-06-14 14:54 ` tkoenig at gcc dot gnu.org
2020-06-14 15:10 ` tkoenig at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-06-14 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35718
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |longb at cray dot com
--- Comment #7 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
*** Bug 68927 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-12-11 18:00 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-27 16:01 [Bug fortran/35718] New: deallocating non-allocated pointer target does not fail dick dot hendrickson at gmail dot com
2008-03-27 16:50 ` [Bug fortran/35718] " burnus at gcc dot gnu dot org
2008-04-13 20:59 ` tkoenig at gcc dot gnu dot org
2008-08-08 21:14 ` jv244 at cam dot ac dot uk
2008-09-28 19:55 ` pault at gcc dot gnu dot org
2008-11-06 6:24 ` pault at gcc dot gnu dot org
2009-04-06 10:56 ` pault at gcc dot gnu dot org
[not found] <bug-35718-4@http.gcc.gnu.org/bugzilla/>
2020-06-14 14:54 ` tkoenig at gcc dot gnu.org
2020-06-14 15:10 ` tkoenig at gcc dot gnu.org
2020-12-10 16:03 ` pault at gcc dot gnu.org
2020-12-11 18:00 ` dominiq at lps dot ens.fr
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).