[flang] Replay a FORMAT at the right position
authorpeter klausler <pklausler@nvidia.com>
Wed, 22 Jul 2020 00:10:14 +0000 (17:10 -0700)
committerpeter klausler <pklausler@nvidia.com>
Wed, 22 Jul 2020 01:59:49 +0000 (18:59 -0700)
commitc6cb726a8c60d97908016fe7fb76cdc88b543db2
tree4b722914ae0484c2fbbce822e1e0ac3feb4cf033
parent320389e849f82403049c76ef06d11bfcef7b82e3
[flang] Replay a FORMAT at the right position

When FORMAT control reaches the final parenthesis and data items
remain, we advance a record and revert to the beginning of the
FORMAT for further items.  But when the FORMAT contains any
nested parenthesized group of editing descriptors, possibly
repeated, reversion must be to the beginning of the last such
top-level parenthesized group, including its repetition count.

Reviewed By: sscalpone, PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D84281
flang/runtime/format-implementation.h
flang/unittests/Runtime/hello.cpp