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
flang generates incorrect debug info for the pointers to array slices in the below example.
> flang -g pointers.f90 -o pointers > gdb ./pointers > b pointers.f90:36 > run Breakpoint 1, test () at pointers.f90:36 36 print *,"storage1 = ",storage1 > info locals storage1 = (-2, -1, -8, -7, -7, -7, -7, -9, -1, -3) pointer2 = (-5, -4, -11, -10, -10, -10) storage2 = (-5, -4, -11, -10, -10, -10, -10, -12, -4, -6) pointer1 = (-2, -1, -8, -7, -7, -7)
You can see that pointer1 and pointer2 are the right size, but are starting from index 1 in their target arrays and not index 3.
pointer1
pointer2
1
3
! pointers.f90 program test !static storage integer, dimension(10), target :: storage1 !pointer to storage1 integer, dimension(:), pointer :: pointer1 !dynamically allocated integer, dimension(:), allocatable, target :: storage2 !pointer to storage2 integer, dimension(:), pointer :: pointer2 allocate(storage2(10)) storage1=-1 storage1(1)=-2 storage1(10)=-3 storage2=-4 storage2(1)=-5 storage2(10)=-6 pointer1=>storage1(3:8) pointer2=>storage2(3:8) pointer1=-7 pointer1(1)=-8 pointer1(6)=-9 pointer2=-10 pointer2(1)=-11 pointer2(6)=-12 print *,"storage1 = ",storage1 print *,"storage2 = ",storage2 print *,"pointer1 = ",pointer1 print *,"pointer2 = ",pointer2 write(*,*) 'end of program' end
The text was updated successfully, but these errors were encountered:
vigbalu
No branches or pull requests
flang generates incorrect debug info for the pointers to array slices in the below example.
You can see that
pointer1
andpointer2
are the right size, but are starting from index1
in their target arrays and not index3
.The text was updated successfully, but these errors were encountered: