SUBROUTINE TEST_ASSOC(VAR1, VAR2)

IMPLICIT NONE

TYPE(SOME_TYPE)      , INTENT (INOUT) :: VAR1
TYPE(SOME_OTHER_TYPE), INTENT (INOUT) :: VAR2

ASSOCIATE(V1=>VAR1%FIELD1, V2=>VAR2%FIELD2(42)%FIELD3)

IF (VAR2%FIELD4%BOOL1 == 1) THEN
   V1(:) = V2(:)
END IF

END ASSOCIATE

END SUBROUTINE TEST_ASSOC
