Closed ohno-fj closed 10 months ago
@llvm/issue-subscribers-flang-frontend
@llvm/issue-subscribers-bug
The issue doesn't happen when the test program is built with flang-new -flang-experimental-hlfir
.
This issue isn't reproduced now because HLFIR is enabled by default.
$ flang-new -v z033.f90
flang-new version 18.0.0 (https://github.com/llvm/llvm-project.git ba89749cd24950c9c51f4cc64277ce0421d86d20)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /path/to/install/bin
Found candidate GCC installation: /opt/rh/gcc-toolset-12/root/usr/lib/gcc/aarch64-redhat-linux/12
Selected GCC installation: /opt/rh/gcc-toolset-12/root/usr/lib/gcc/aarch64-redhat-linux/12
:
$ ./a.out
before a = 11 -2 21 1
after a = 11 10 21 10
In Flang, the value of the array used in the
scalar-mask-expr(a(i)>1)
appears to reflect the value of the array definition in theFORALL
construct.The following are the test program, results of Flang-new, GFortran and ifort compilation and execution.
z033.f90
: