From a60121f9f3138ca76a4fdc81781670612c650afa Mon Sep 17 00:00:00 2001 From: Jean Perier Date: Thu, 24 Jan 2019 09:46:35 -0800 Subject: [PATCH] [flang] Fix issue flang-compiler/f18#267 (GetScalarConstantValue) Original-commit: flang-compiler/f18@9fcbd09a51e935572e63bab6a5b30206375b24f6 Tree-same-pre-rewrite: false --- flang/lib/evaluate/fold.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flang/lib/evaluate/fold.h b/flang/lib/evaluate/fold.h index bdaa520..32155f6 100644 --- a/flang/lib/evaluate/fold.h +++ b/flang/lib/evaluate/fold.h @@ -62,7 +62,7 @@ const Scalar *GetScalarConstantValue(const Expr &expr) { template const Scalar *GetScalarConstantValue( const Expr> &expr) { - if (const auto *kindExpr{UnwrapExpr>(expr.u)}) { + if (const auto *kindExpr{UnwrapExpr>(expr)}) { return GetScalarConstantValue(*kindExpr); } return nullptr; @@ -70,7 +70,7 @@ const Scalar *GetScalarConstantValue( template const Scalar *GetScalarConstantValue(const Expr &expr) { - if (const auto *kindExpr{UnwrapExpr>(expr.u)}) { + if (const auto *kindExpr{UnwrapExpr>(expr)}) { return GetScalarConstantValue(*kindExpr); } return nullptr; -- 2.7.4