Bug 83209 - [11/12/13/14 Regression] [Coarray] Failure of allocation of a coarray with a pointer component
Summary: [11/12/13/14 Regression] [Coarray] Failure of allocation of a coarray with a ...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 8.0
: P4 normal
Target Milestone: 11.5
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on:
Blocks: Coarray
  Show dependency treegraph
 
Reported: 2017-11-29 09:39 UTC by Paul Thomas
Modified: 2023-07-07 10:32 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 6.4.0
Known to fail: 7.2.0, 8.0
Last reconfirmed: 2017-11-29 00:00:00


Attachments
tree dump of failing test (1.14 KB, text/plain)
2017-11-29 09:39 UTC, Paul Thomas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Thomas 2017-11-29 09:39:11 UTC
Created attachment 42740 [details]
tree dump of failing test

integer, target :: tgt = 45
  type :: t
    integer, pointer :: i => tgt
  end type
  type(t), allocatable :: c(:)[:]

  allocate(c(10)[*])
  deallocate(c)
end

fails with:

[pault@pc30 pr83076]$ ~/irun/bin/gfortran -static-libgfortran test.f90  -fdump-tree-original -O3 -fcoarray=lib -lcaf_single -g
[pault@pc30 pr83076]$ ./a.out
At line 8 of file test.f90
Fortran runtime error: Attempt to DEALLOCATE unallocated 'c'

Error termination. Backtrace:
#0  0x4029f4 in MAIN__
	at /home/pault/prs/pr83076/test.f90:8
#1  0x4029f4 in main
	at /home/pault/prs/pr83076/test.f90:9


The tree dump is attached.

The version with an allocatable component works as expected.

Paul
Comment 1 Dominique d'Humieres 2017-11-29 10:26:11 UTC
Could be caused by r244196 (pr78781).
Comment 2 Richard Biener 2018-01-25 08:28:37 UTC
GCC 7.3 is being released, adjusting target milestone.
Comment 3 Richard Biener 2019-11-14 07:59:09 UTC
The GCC 7 branch is being closed, re-targeting to GCC 8.4.
Comment 4 Jakub Jelinek 2020-03-04 09:52:48 UTC
GCC 8.4.0 has been released, adjusting target milestone.
Comment 5 Jakub Jelinek 2021-05-14 09:49:31 UTC
GCC 8 branch is being closed.
Comment 6 Richard Biener 2021-06-01 08:09:39 UTC
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
Comment 7 Richard Biener 2022-05-27 09:37:52 UTC
GCC 9 branch is being closed
Comment 8 Jakub Jelinek 2022-06-28 10:34:01 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Comment 9 Richard Biener 2023-07-07 10:32:45 UTC
GCC 10 branch is being closed.