[Bug fortran/97589] Segementation fault when allocating coarrays.

tkoenig at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Nov 16 20:33:05 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97589

--- Comment #14 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Thomas Koenig from comment #13)
> (In reply to Thomas Koenig from comment #12)
> > Reduced test case:
> > 
> > program main
> >   type global_model_state
> >      real, allocatable :: ps(:)  [:]
> >   end type global_model_state
> >   type (global_model_state) :: ms_full
> >   allocate (ms_full % ps(100) [*])
> >   ms_full %ps = 42.
> > end program main
> 
> That one is now fixed, but the original test case still segfaults.

... with 16 images:

Decomposition information on image   1 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  13 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  15 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  16 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   6 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  14 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   8 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   2 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   3 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   4 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  11 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   7 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  10 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   5 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image   9 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.
Decomposition information on image  12 : there are   8 *   2 slabs; the slabs
are   9 *  35 grid cells in size.

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.

Backtrace for this error:
#0  0x7fb21745659f in ???
        at
/usr/src/debug/glibc-2.26-lp151.19.19.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
#1  0x41195b in __types_MOD_global_init
        at /home/ig25/Krempel/Nico/random_weather.f90:154
#2  0x4148e7 in random_weather
        at /home/ig25/Krempel/Nico/random_weather.f90:494
#3  0x41576d in image_main_wrapper
        at ../../../coarray_native/libgfortran/caf_shared/coarraynative.c:183
#4  0x4153d2 in main
        at /home/ig25/Krempel/Nico/random_weather.f90:413
ERROR: Image 16(0x5a1d) failed


More information about the Gcc-bugs mailing list