If I compile with the F2003 standard-semantics option set I discovered that printing to the * UNIT is the same as printing to UNIT 6 if a file with that unit has been OPENed. After searching around a bit I found out that it might have something to do with the constant OUTPUT_UNIT in the standard intrinsic module ISO_FORTRAN_ENV. Why should this module influence my program if I'm not USEing it? I find this especially strange in light of that I cannot use OUTPUT_UNIT unless I USE the module.
I don't know the history of this module, but I guess it has something to do with code portability..? If so, I find it strange to sacrifice code predictability for portability...
Would it be possible to have a value for OUTPUT_UNIT that does not take away a valid UNIT number? For instance by using some IEEE 'special numbers'?
As I generally use enumerators for UNIT numbers (to get a kind of automatic numbering) it is awkward having to skip particular, and possibly processor dependent, values.