Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defect #8 in recent polymorphic assignment feature #polysegfaults #832

Open
RichBarton-Arm opened this issue Nov 12, 2019 · 0 comments
Open

Comments

@RichBarton-Arm
Copy link
Collaborator

RichBarton-Arm commented Nov 12, 2019

Testing out the new polymorphic assignment feature, I can trigger lots of segfaults in the fortran runtime. I am reporting these as separate failures even though they clearly could be related. Search for #polysegfaults .

Compiling the below code with flang (no additional options) produces a binary that gives a runtime segfault assigning to y from the output of the spread intrinsic.

program test
  implicit none
  type t
    integer i
  end type
  class(t),allocatable :: x(:)
  class(t),allocatable :: y(:,:)
  allocate(t::x(2))
  y = spread(x,dim=1,ncopies=1)
  select type(y)
  type is (t)
    print *,y(1,1)
  end select
end program

This has very similar backtrace to #831 with a very large size being malloced by the runtime.

Tested with eab3991 built with llvm9 branches of both llvm and flang-driver on AArch64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants