File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -243,17 +243,20 @@ function constructs_from_real() result(passed)
243243 logical passed
244244 real , parameter :: real_value = - 1 ./ 1024 . ! use a negative power of 2 an exactly representable rational number
245245 real read_value
246+ character (len= :), allocatable :: character_representation
246247
247248#ifndef _CRAYFTN
248249 associate(string = > string_t(real_value))
249- read (string% string (), * ) read_value
250+ character_representation = string% string ()
251+ read (character_representation, * ) read_value
250252 passed = read_value == real_value
251253 end associate
252254#else
253255 block
254256 type (string_t) string
255257 string = string_t(real_value)
256- read (string% string (), * ) read_value
258+ character_representation = string% string ()
259+ read (character_representation, * ) read_value
257260 passed = read_value == real_value
258261 end block
259262#endif
You can’t perform that action at this time.
0 commit comments