Skip to content

Conversation

@DJDavies2
Copy link
Contributor

I think this fixes #80.

The problem here is that there are pointers that are becoming undefined because they are being associated with something that does not have the target attribute. This can happen like this:

integer :: a
integer, pointer :: b

call sub(a,b)

....

subroutine sub(a,b)
integer, target :: a
integer,pointer :: b
b => a
end subroutine sub

The pointer assignment in sub is valid. However when sub returns it is not valid to assume that b is associated with a in the calling routine because a does not have the target attribute in the calling rouitne; b becomes undefined.

I have added the target attributes where necessary to get this test to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant