Skip to content

[flang][AIX] zero-sized array crash #110913

Open
@kkwli

Description

@kkwli

Reproducer

  integer, allocatable :: a(:)
  allocate(a(0))
  inquire(iolength=iol) a
end
$ flang-new zero.f90
$ ./a.out

fatal Fortran runtime error(/home/kli/zero.f90:3): Bad address for I/O item -- null base address or subscripts out of range
IOT/Abort trap (core dumped)

Original test: https://github.com/llvm/llvm-test-suite/blob/main/Fortran/gfortran/torture/execute/iolength_1.f90

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behaviorflang:ir

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions