[flang] Fix unparsing of pointer-decls with deferred shape.
authorpeter klausler <pklausler@nvidia.com>
Mon, 9 Apr 2018 20:40:20 +0000 (13:40 -0700)
committerpeter klausler <pklausler@nvidia.com>
Mon, 9 Apr 2018 20:50:50 +0000 (13:50 -0700)
Original-commit: flang-compiler/f18@3c7c7eced5898e92692dcce1584b014f046c5283
Reviewed-on: https://github.com/flang-compiler/f18/pull/48
Tree-same-pre-rewrite: false

flang/lib/parser/unparse.cc

index 90a2d84..add7777 100644 (file)
@@ -576,7 +576,11 @@ public:
     Walk(x.t, "=");
   }
   void Unparse(const PointerStmt &x) {  // R853
-    Word("POINTER"), Walk(x.v, ", ");
+    Word("POINTER :: "), Walk(x.v, ", ");
+  }
+  void Unparse(const PointerDecl &x) {  // R854
+    Walk(std::get<Name>(x.t));
+    Walk("(", std::get<std::optional<DeferredShapeSpecList>>(x.t), ")");
   }
   void Unparse(const ProtectedStmt &x) {  // R855
     Word("PROTECTED :: "), Walk(x.v, ", ");