[flang] Still do scalar- constraint check.
authorpeter klausler <pklausler@nvidia.com>
Tue, 19 Mar 2019 18:59:58 +0000 (11:59 -0700)
committerpeter klausler <pklausler@nvidia.com>
Tue, 19 Mar 2019 18:59:58 +0000 (11:59 -0700)
Original-commit: flang-compiler/f18@e50b4c4b48c0281473670cdf011e335b37d526dc
Reviewed-on: https://github.com/flang-compiler/f18/pull/342

flang/lib/parser/grammar.h
flang/lib/parser/parse-tree.h

index 1f04f42..f466ad0 100644 (file)
@@ -2326,7 +2326,7 @@ TYPE_CONTEXT_PARSER("STOP statement"_en_US,
 // R1162 stop-code -> scalar-default-char-expr | scalar-int-expr
 // The two alternatives for stop-code can't be distinguished at
 // parse time.
-TYPE_PARSER(construct<StopCode>(expr))
+TYPE_PARSER(construct<StopCode>(scalar(expr)))
 
 // R1164 sync-all-stmt -> SYNC ALL [( [sync-stat-list] )]
 TYPE_CONTEXT_PARSER("SYNC ALL statement"_en_US,
index 1439847..1191d78 100644 (file)
@@ -2392,9 +2392,9 @@ struct ComputedGotoStmt {
 
 // R1162 stop-code -> scalar-default-char-expr | scalar-int-expr
 // We can't distinguish character expressions from integer
-// expressions until semantics, so we just parse an expr and
+// expressions during parsing, so we just parse an expr and
 // check its type later.
-WRAPPER_CLASS(StopCode, Expr);
+WRAPPER_CLASS(StopCode, Scalar<Expr>);
 
 // R1160 stop-stmt -> STOP [stop-code] [, QUIET = scalar-logical-expr]
 // R1161 error-stop-stmt ->