From f3b5d156cb4c05a7253bcc0bde3874002b3fb7ca Mon Sep 17 00:00:00 2001 From: peter klausler Date: Mon, 12 Aug 2019 12:10:43 -0700 Subject: [PATCH] [flang] Fix bug flang-compiler/f18#642 Original-commit: flang-compiler/f18@d898b29285b65fea4a43cc4901623decec481c1a Reviewed-on: https://github.com/flang-compiler/f18/pull/648 --- flang/lib/semantics/expression.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flang/lib/semantics/expression.cc b/flang/lib/semantics/expression.cc index 0472125..f0994ce 100644 --- a/flang/lib/semantics/expression.cc +++ b/flang/lib/semantics/expression.cc @@ -1191,7 +1191,7 @@ MaybeExpr ExpressionAnalyzer::Analyze( } } - // This list holds all of the components in the derived type and its + // This iterator traverses all of the components in the derived type and its // parents. The symbols for whole parent components appear after their // own components and before the components of the types that extend them. // E.g., TYPE :: A; REAL X; END TYPE @@ -1334,6 +1334,7 @@ MaybeExpr ExpressionAnalyzer::Analyze( if (IsPointer(*symbol)) { CheckPointerAssignment(messages, context_.intrinsics(), *symbol, *value); // C7104, C7105 + result.Add(*symbol, Fold(GetFoldingContext(), std::move(*value))); } else if (MaybeExpr converted{ ConvertToType(*symbol, std::move(*value))}) { result.Add(*symbol, std::move(*converted)); -- 2.7.4