[flang][runtime] Enforce restrictions on unlimited format repetition
authorPeter Klausler <pklausler@nvidia.com>
Thu, 28 Apr 2022 21:23:31 +0000 (14:23 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Mon, 9 May 2022 19:48:23 +0000 (12:48 -0700)
commitfb9ec95cf0c2ed6e3b5273b2274eac70dd8bd3d4
tree979e04e4a6867d5ac7541e850bf92d17d7b5c986
parentcea8b8a72d877a796c1e97fca2adae8a85bb36a1
[flang][runtime] Enforce restrictions on unlimited format repetition

A repeated format item group with an unlimited ('*') repetition count
can appear only as the last item at the top level of a format; it can't
be nested in more parentheses and it can't be followed by anything
else.

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