I do have a problem with the TRANSFER intrinsic function., When I try to get the result of a C_LOC function in the form of a regular integer variable then it works fine under 32 bits programming. Under 64 bits it depends on the mold argument what result is returned. When using NULL the result of the function is a 32 bit and it seems that only the lower 32 bits are used and the rest is ignored. That is strange under 64 bits! What is going wrong here? An example file is added.
For more complete information about compiler optimizations, see our Optimization Notice.