This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/83118] [7/8 Regression] Bad intrinsic assignment of class(*) array component of derived type
- From: "neil.n.carlson at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 24 Feb 2018 07:53:43 +0000
- Subject: [Bug fortran/83118] [7/8 Regression] Bad intrinsic assignment of class(*) array component of derived type
- Auto-submitted: auto-generated
- References: <bug-83118-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83118
--- Comment #4 from Neil Carlson <neil.n.carlson at gmail dot com> ---
Note that if the sourced allocation in the comment 0 test case
allocate(x%v,source=['foo','bar'])
is replaced by the equivalent (I think) assignment
x%v = ['foo','bar']
Then the code produces a run time segfault instead:
$ gfortran --version
GNU Fortran (GCC) 8.0.1 20180224 (experimental)
$ gfortran -g -fbacktrace bug.f90
$ ./a.out
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7f3c46fda94f in ???
#1 0x0 in ???
Segmentation fault (core dumped)
I think the problems here may be related to the simpler test cases in PR84539
which I just reported.