public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/65841] New: Seg fault on intrinsic assignment to allocatable derived type with allocatable component
@ 2015-04-22  0:43 damian at sourceryinstitute dot org
  2015-04-22 13:03 ` [Bug fortran/65841] " pault at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: damian at sourceryinstitute dot org @ 2015-04-22  0:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65841
           Summary: Seg fault on intrinsic assignment to allocatable
                    derived type with allocatable component
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: damian at sourceryinstitute dot org

The code below produces a segmentation fault upon the second intrinsic
assignment to an allocatable component of derived type containing an
allocatable component of intrinsic type.

Damian

$ cat realloc_alloc_comp_with_alloc_comp.f90 
type a
  real, allocatable :: f
end type
type b
  type(a), allocatable :: g
end type
type(b) c,d
c%g=a(1.) 
d=c       
d=c       ! seg fault with gfortran 5.0 Build 20150216
end

$ gfortran realloc_alloc_comp_with_alloc_comp.f90 

$ ./a.out

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

Backtrace for this error:
#0  0x7F3705ACEBB7
#1  0x7F3705ACDDB0
#2  0x7F3704FD949F
#3  0x7F370502654C
#4  0x400901 in MAIN__ at realloc_alloc_comp_with_alloc_comp.f90:0
Segmentation fault (core dumped)

$ gfortran --version
GNU Fortran (GCC) 5.0.0 20150216 (experimental)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-10-18 15:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-22  0:43 [Bug fortran/65841] New: Seg fault on intrinsic assignment to allocatable derived type with allocatable component damian at sourceryinstitute dot org
2015-04-22 13:03 ` [Bug fortran/65841] " pault at gcc dot gnu.org
2015-04-22 14:24 ` dominiq at lps dot ens.fr
2015-04-23  7:39 ` dominiq at lps dot ens.fr
2015-04-27 17:34 ` vehre at gcc dot gnu.org
2015-05-05  9:10 ` vehre at gcc dot gnu.org
2015-10-18 15:01 ` mikael at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).