Skip to content

Segfault on sourced allocation of polymorphic variable #720

@nncarlson

Description

@nncarlson

This example segfaults on the sourced allocation line with the March 2019 binary release.

type, abstract :: json_value
end type

type, extends(json_value) :: json_string
  character(:), allocatable :: value
end type

class(json_value), allocatable :: a

allocate(a, source=json_string('foo'))  ! <== SEG FAULT HERE

select type(a)
type is (json_string)
  if (len(a%value) /= 3) stop 1
  if (a%value /= 'foo') stop 2
class default
  stop 3
end select

end

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnvidiaverifyThis issue appears to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions