Closed ohno-fj closed 11 months ago
@llvm/issue-subscribers-flang-frontend
Author: None (ohno-fj)
This issue isn't reproduced now because HLFIR is enabled by default.
$ flang-new -v target_tp01_3.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
a_pointer(3) = 42
pass
The result of subarray operation passed to
subroutine
is incorrect.When I specify
-flang-experimental-hlfir
at the compilation, I can avoid the execution error.The following are the test program, Flang-new, Gfortran and ifort compilation result.
target_tp01_3.f90: