https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83118
Neil Carlson <neil.n.carlson at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Resolution|DUPLICATE |---
--- Comment #6 from Neil Carlson <neil.n.carlson at gmail dot com> ---
It doesn't fix the test case of comment 4 (which I only gave as a mod to the
comment 0 example). Here it is explicitly:
type :: any_vector
class(*), allocatable :: v(:)
end type
type(any_vector) :: x, y
x%v = ['foo','bar']
select type (v => x%v)
type is (character(*))
print '("orig=[""",a,''","'',a,''"]'')', v ! expect orig=["foo","bar"]
end select
y = x ! THIS ASSIGNMENT IS NOT BEING DONE CORRECTLY
select type (v => y%v)
type is (character(*))
print '("copy=[""",a,''","'',a,''"]'')', v ! expect copy=["foo","bar"]
end select
end
$ gfortran --version
GNU Fortran (GCC) 8.1.1 20180521
$ gfortran gfortran-20171122b.f90
$ ./a.out
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7f249667794f in ???
#1 0x0 in ???
Segmentation fault (core dumped)