Skip to content

Commit dc3a2c3

Browse files
committed
fix(ibm): work around xlf association issue
1 parent 6adce09 commit dc3a2c3

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/sp_smart_pointer_test_m.F90

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,17 @@ function check_deletion() result(test_passes)
9191
function check_copy() result(test_passes)
9292
logical test_passes
9393
type(object_t) :: reference
94+
#ifdef XLF
95+
type(object_t) :: original
9496

97+
original = object_t()
98+
#else
9599
associate(original => object_t())
100+
#endif
96101
reference = original
97102

98103
block
99-
type(object_t) declared, reference_to_declared
104+
type(object_t) :: declared, reference_to_declared
100105

101106
if (scan(compiler_version(),"GCC ")==1) then
102107
test_passes = associated(original%ref, reference%ref) .and. .false. ! intentional failure due to the message below
@@ -109,13 +114,15 @@ function check_copy() result(test_passes)
109114
test_passes = associated(original%ref, reference%ref) .and. associated(declared%ref, reference_to_declared%ref)
110115
end if
111116
end block
117+
#ifndef XLF
112118
end associate
119+
#endif
113120

114121
end function
115122

116123
function check_shallow_copy() result(test_passes)
117124
logical test_passes
118-
125+
119126
block
120127
type(shallow_t) shallow_copy
121128

0 commit comments

Comments
 (0)