[flang-commits] [PATCH] D123732: [flang] Allow POINTER attribute statement on procedure interfaces

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Apr 15 20:21:20 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGde6e88ef5a5d: [flang] Allow POINTER attribute statement on procedure interfaces (authored by klausler).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123732/new/

https://reviews.llvm.org/D123732

Files:
  flang/lib/Semantics/resolve-names.cpp
  flang/test/Semantics/assign02.f90


Index: flang/test/Semantics/assign02.f90
===================================================================
--- flang/test/Semantics/assign02.f90
+++ flang/test/Semantics/assign02.f90
@@ -15,11 +15,11 @@
   subroutine s0
     !ERROR: 'p1' may not have both the POINTER and TARGET attributes
     real, pointer :: p1, p3
+    !ERROR: 'p2' may not have both the POINTER and ALLOCATABLE attributes
     allocatable :: p2
     !ERROR: 'sin' may not have both the POINTER and INTRINSIC attributes
     real, intrinsic, pointer :: sin
     target :: p1
-    !ERROR: 'p2' may not have both the POINTER and ALLOCATABLE attributes
     pointer :: p2
     !ERROR: 'a' may not have the POINTER attribute because it is a coarray
     real, pointer :: a(:)[*]
Index: flang/lib/Semantics/resolve-names.cpp
===================================================================
--- flang/lib/Semantics/resolve-names.cpp
+++ flang/lib/Semantics/resolve-names.cpp
@@ -3758,8 +3758,7 @@
     symbol.ReplaceName(name.source);
     EndArraySpec();
   } else {
-    Symbol &symbol{DeclareUnknownEntity(name, Attrs{Attr::POINTER})};
-    symbol.ReplaceName(name.source);
+    HandleAttributeStmt(Attr::POINTER, std::get<parser::Name>(x.t));
   }
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123732.423209.patch
Type: text/x-patch
Size: 1227 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220416/6aac656f/attachment.bin>


More information about the flang-commits mailing list