[flang][runtime] Correct automatic parenthesized format repetition case (#71436)
In Fortran, a format automatically repeats, with a line break, until all the data items of a data transfer statement have been consumed. PRINT "(3I4)", 1, 2, 3, 4, 5, 6 prints two lines, for example, three values each. When there are nested parentheses in a format, the rightmost set of parentheses at the top level are used for automatic repetition. PRINT "(I4,2(I4))" 1, 2, 3, 4, 5, 6, 7 print three lines, with three values on the first and two each on the later ones. Fix a bug in format interpretation that causes the detection of the "rightmost" set of parentheses to take place on each pass, leading to problems when parentheses are even further nested.
parent
9652e9b7
Please register or sign in to comment