[flang-commits] [PATCH] D154375: [flang][NFC] Document semantics of an ambiguous/non-portable use case

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Mon Jul 3 10:28:43 PDT 2023


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added subscribers: sunshaoce, jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

We intentionally process NAMELIST groups in a scope after having
resolved all of the names in that scope.  This means that a name   
whose first appearance in a scope is in the NAMELIST group resolves  
to a local object, if any, rather than to any host associated object.
The standard is unclear on this point, and there is no clear
precedent in other compilers.

This patch doesn't implement this choice -- that was done long ago --
but just documents the behavior in Extensions.md.


https://reviews.llvm.org/D154375

Files:
  flang/docs/Extensions.md


Index: flang/docs/Extensions.md
===================================================================
--- flang/docs/Extensions.md
+++ flang/docs/Extensions.md
@@ -581,6 +581,13 @@
 * F18 allows `OPTIONAL` dummy arguments to interoperable procedures
   unless they are `VALUE` (C865).
 
+* F18 processes the `NAMELIST` group declarations in a scope after it
+  has resolved all of the names in that scope.  This means that names
+  that appear before their local declarations do not resolve to host
+  associated objects and do not elicit errors about improper redeclarations
+  of implicitly typed entities.
+
+
 ## De Facto Standard Features
 
 * `EXTENDS_TYPE_OF()` returns `.TRUE.` if both of its arguments have the


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154375.536837.patch
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20230703/21af773d/attachment-0001.bin>


More information about the flang-commits mailing list