Seg fault on internal output to a character scalar coarray
Damian Rouson
sourcery@rouson.net
Sat Apr 27 21:06:00 GMT 2013
I just submitted the example below as PR 57093. This code seg faults with gfortran 4.7, 4.8, and 4.9. With the Cray compiler, it compiles and runs without error.
$ cat co_hello.f90
program main
! len<25 produces the expected result len>=25 seg faults
character(len=25), allocatable :: greeting[:]
allocate(greeting[*])
write(greeting,"(a)") "z"
end
$ gfortran -fcoarray=single co_hello.f90
$ ./a.out
a.out(35951) malloc: *** error for object 0x7fc5ba404c20: pointer being freed
was not allocated
*** set a breakpoint in malloc_error_break to debug
Program received signal SIGABRT: Process abort signal.
Backtrace for this error:
#0 0x1055d2e62
#1 0x1055d362e
#2 0x7fff90ae6949
Abort trap: 6
$ gfortran --version
GNU Fortran (MacPorts gcc49 4.9-20130414_0) 4.9.0 20130414 (experimental)
More information about the Fortran
mailing list