[all-commits] [llvm/llvm-project] c5729f: [flang] Set default form if unspecified at end of ...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue Aug 31 23:41:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c5729f2e638a792759a53c28fbe39a22ede86943
      https://github.com/llvm/llvm-project/commit/c5729f2e638a792759a53c28fbe39a22ede86943
  Author: Jean Perier <jperier at nvidia.com>
  Date:   2021-09-01 (Wed, 01 Sep 2021)

  Changed paths:
    M flang/runtime/io-stmt.cpp

  Log Message:
  -----------
  [flang] Set default form if unspecified at end of OPEN statement

The standard specifies that the form must be set to a default at the
end of an open statement (C.7.4 point 2) where it was not specified.
Only in the case of a pre-connected unit can the form be deferred
until the first data transfer statement.

Set back the default form setting in OpenStatementState::EndIoStatement
that had been removed when deferring the pre-connected unit from setting
in 199a623ebf808a01e920ebd9904c99e633c33a1f.

Also return "UNDEFINED" instead of "UNKNOWN" to the FORM inquiry when the
form was not yet specified as defined in 12.10.2.12.

Related test: syntax 215a216.

Differential Revision: https://reviews.llvm.org/D108990




More information about the All-commits mailing list