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

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

Open
kkwli opened this issue Oct 2, 2024 · 0 comments
Open

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

kkwli opened this issue Oct 2, 2024 · 0 comments
Labels
flang Flang issues not falling into any other category

Comments

@kkwli
Copy link
Collaborator

kkwli commented Oct 2, 2024

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.

@kkwli kkwli added the flang Flang issues not falling into any other category label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category
Projects
None yet
Development

No branches or pull requests

1 participant