The following program may be eligible for an award for the most weird and useless nonsense, but it generates an incorrect result when compiled with /FULL_DEBUG. The program is on the long side, but I have tried hard to simplify it, and it seems that with almost any change, the problem disappears.
The program (in the first code segment) calls a subroutine s1, which is supposed to copy the value of getsLost into ctest, but ctest prints as blank. The module is broken into two halves because it is apparently too long. Subroutine s1 performs a set of apparently meaningless operations, calling functions and subroutines most of which do essentially nothing, but somehow they combine to lose the value of getsLost. All the code between lines 32 (starting immediately after the 'Do nothing meaningful' comment) and 76 (immediately before the 'Try to use the value of getsLost' comment) has no intentional logic - it is purely what is left after a very long process of reducing a much larger programme to a minimum. There are many obvious ways to simplify this section of the code, but not, I have found, without making the error disappear.
I have the same problem occurring without using /FULL_DEBUG, but it will be a large task to try to isolate that. I am hoping the problem can be identified using this example.
Program p
Use m
Integer :: i1
Logical :: l1
Character(Len= 2) :: getsLost = '?'
Character(Len=64), Dimension(2) :: cs1, cs2
!
i1 = 3
t3%i1 = 1
t3%i2 = 2
t3%i3 = 3
Call s1 (getsLost, cs1, cs2, l1, i1)
Print*, ctest
End Program p