3 ! Tests the fix for PR64933
5 ! Contributed by Olivier Marsden <olivier.marsden@ecmwf.int>
9 character(len
= 15) :: char_var
, char_var_dim (3)
10 character(len
= 80) :: buffer
12 ! Original failing case reported in PR
13 ASSOCIATE(should_work
=>char_var
)
14 should_work
= "test succesful"
15 write (buffer
, *) should_work(5:14)
18 if (trim (buffer
) .ne
. " succesful") call abort
20 ! Found to be failing during debugging
21 ASSOCIATE(should_work
=>char_var_dim
)
22 should_work
= ["test SUCCESFUL", "test_SUCCESFUL", "test.SUCCESFUL"]
23 write (buffer
, *) should_work(:)(5:14)
26 if (trim (buffer
) .ne
. " SUCCESFUL_SUCCESFUL.SUCCESFUL") call abort
28 ! Found to be failing during debugging
29 ASSOCIATE(should_work
=>char_var_dim(1:2))
30 should_work
= ["test SUCCESFUL", "test_SUCCESFUL", "test.SUCCESFUL"]
31 write (buffer
, *) should_work(:)(5:14)
34 if (trim (buffer
) .ne
. " SUCCESFUL_SUCCESFUL") call abort