Compile using either of:
./compile_gnu
and you should get the result:
3 T F
true -> false
3 F T
false -> true
Done.
Now compile using Intel:
./compile_intel
and you get the result:
3 T F
true -> true
3 F T
false -> true
Done.
Which is incorrect. Enable -fpscomp logical
in compile_intel, recompile, then you get:
3 T F
true -> false
3 F T
false -> true
Done.
Thanks everybody for testing this! Conclusion: gfortran, Cray, IBM work. Intel and PGI need an extra option to work.
I've documented this behavior here:
http://www.fortran90.org/src/gotchas.html#c-fortran-interoperability-of-logical