[all-commits] [llvm/llvm-project] 49744c: [flang][OpenACC] Allow blanks around ':' in a gang...

Ron Green [NVIDIA] via All-commits all-commits at lists.llvm.org
Thu Jul 16 10:16:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49744c0cc07c85f201267d75ec064eab743270d4
      https://github.com/llvm/llvm-project/commit/49744c0cc07c85f201267d75ec064eab743270d4
  Author: Ron Green [NVIDIA] <rogreen at nvidia.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M flang/lib/Parser/openacc-parsers.cpp
    M flang/test/Parser/acc-unparse.f90

  Log Message:
  -----------
  [flang][OpenACC] Allow blanks around ':' in a gang-arg (#210089)

The parsers for the STATIC, DIM, and NUM forms of an OpenACC gang-arg
used the token strings "STATIC: ", "DIM: ", and "NUM: ", none of which
permit a blank between the keyword and the ':' separator. A space in a
TokenStringMatch pattern is the only place a blank is accepted in the
source (outside the leading/trailing skip), so a directive such as

    !$acc loop gang(static : 1)

was rejected with "expected end of OpenACC directive", even though
free-form Fortran allows optional blanks around the separator.

Move the blank in each token string to before the ':' ("STATIC :", etc.)
so zero or more blanks are accepted on either side of the separator. The
_tok form keeps the blank optional, so the no-space spelling still
parses without a warning.

Add parser/unparse coverage for the spaced spellings of the static, dim,
and num gang arguments.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list