As no one else has bitten, I'll say that I don't know how the result of this code could be predicted. Do you mean, is it a compiler bug that it doesn't give more diagnostics? OpenMP is notorious for not checking at compile time. That's one of the reasons for the Intel Thread Checker.
|1 |I/O |Error |1 |omp |I/O operation at "ym2.f90":4 |"ym2.f9|"ym2.f9|
| |data-race| | |parallel|conflicts with a prior I/O |0":4 |0":4 |
| | | | |region |operation at "ym2.f90":4 | | |
|1 |I/O |Error |1 |omp |I/O operation at "ym1.f90":4 |"ym1.f9|"ym1.f9|
| |data-race| | |parallel|conflicts with a prior I/O |0":4 |0":4 |
| | | | |region |operation at "ym1.f90":4 | | |