Skip to content

[flang][AIX] incorrect maxloc/minloc with -O #110921

@kkwli

Description

@kkwli

Reproducer

  logical :: l
!  logical :: l(3)
  integer, dimension(3) :: a
  integer :: ia(1)

  a = [ 0, -1, 3 ]
  l = .true.
  ia = minloc(a, mask=l)
  print *, ia(1)
end
$ flang-new minloc.f90 ; a.out
 2
$ flang-new -O minloc.f90 ; a.out
 0

If the mask l is an array, the result is correct.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions