We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Version of flang-new : 17.0.0(633146093c4ea78dc8f56a27006fe4eed84be370)
Definitions of an array using subscript triplet of derived type are incorrect.
The following definitions are not correctly applied:
v(1:2)%a(2,3)=2
There is no problem if you change the definition as follows:
v(1)%a(2,3)=2 v(2)%a(2,3)=2
The following are the test program, results of Flang-new, GFortran and ifort compilation and execution.
snggp155_4.f90:
snggp155_4.f90
subroutine sub type x integer, DIMENSION(2, 3) :: a end type x type(x),target::v(3) v(1)%a=3; v(2)%a=3; v(1:2)%a(2,3)=2 write(6,*) "v(1)%a = ", v(1)%a write(6,*) "v(2)%a = ", v(2)%a write(6,*) "v(1:2)%a(2, 3) = ", v(1:2)%a(2, 3) write(6,*) "v(1)%a(2, 3) = ", v(1)%a(2, 3) write(6,*) "v(2)%a(2, 3) = ", v(2)%a(2, 3) end subroutine sub program main call sub end program main
$ flang-new -flang-experimental-exec snggp155_4.f90; ./a.out v(1)%a = 3 3 3 3 2 3 v(2)%a = 3 3 3 3 2 3 v(1:2)%a(2, 3) = 2 2 v(1)%a(2, 3) = 3 v(2)%a(2, 3) = 3 $
$ gfortran snggp155_4.f90; ./a.out v(1)%a = 3 3 3 3 3 2 v(2)%a = 3 3 3 3 3 2 v(1:2)%a(2, 3) = 2 2 v(1)%a(2, 3) = 2 v(2)%a(2, 3) = 2 $
$ ifort snggp155_4.f90; ./a.out v(1)%a = 3 3 3 3 3 2 v(2)%a = 3 3 3 3 3 2 v(1:2)%a(2, 3) = 2 2 v(1)%a(2, 3) = 2 v(2)%a(2, 3) = 2 $
The text was updated successfully, but these errors were encountered:
@llvm/issue-subscribers-bug
Sorry, something went wrong.
Issue also happens when built with flang-new -flang-experimental-hlfir.
flang-new -flang-experimental-hlfir
https://reviews.llvm.org/D154214
@llvm/issue-subscribers-flang-ir
783222e
luporl
No branches or pull requests
Definitions of an array using subscript triplet of derived type are incorrect.
The following definitions are not correctly applied:
There is no problem if you change the definition as follows:
The following are the test program, results of Flang-new, GFortran and ifort compilation and execution.
snggp155_4.f90
:The text was updated successfully, but these errors were encountered: