[flang][runtime] Don't use -1 in I/O API for "default unit" (#76642)
The I/O runtime's API allows -1 to be passed for a unit number in a READ, WRITE, or PRINT statement, where it gets replaced by 5 or 6 as appropriate. This turns out to have been a bad idea, as it prevents the I/O runtime from detecting and reporting a program's invalid attempt to use -1 as an I/O unit number. So just pass 5 or 6 as appropriate.
parent
4c1f488b
Please register or sign in to comment