Hi, I don’t know if you could indeed rely on something different from a .true./.false. on your logical variables given that regardless of how you initialize it, being defined as logical they will be reinterpreted as just .true./.false… I think it would be better if you rely on the logical being either one its values at initialization.
The transfer function will just return a logical, the bytes of your integer will not be fully copied. So it will not help in what you are trying to achieve. Also, transfer will behave differently depending on the compiler you use (with gfortran anything but 0 will return .true., with intel, you might get .true. or .false. depending on the last byte of the integer, unless you use -standard-semantics)
This might be of help to understand the issue Why no logical ==? - #57 by urbanjost
This might be a better option indeed.