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.

Reply via email to