From 62436d06cc4b91380110a33db68ea16e2bc50e97 Mon Sep 17 00:00:00 2001 From: peter klausler Date: Wed, 8 Aug 2018 11:37:40 -0700 Subject: [PATCH] [flang] Add data to a new formatted message. Original-commit: flang-compiler/f18@04b1ae9e68cb5e21393e834229bb6964169fee29 Reviewed-on: https://github.com/flang-compiler/f18/pull/165 Tree-same-pre-rewrite: false --- flang/lib/evaluate/variable.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flang/lib/evaluate/variable.cc b/flang/lib/evaluate/variable.cc index adaaf4a6b922..ba6aff3e7586 100644 --- a/flang/lib/evaluate/variable.cc +++ b/flang/lib/evaluate/variable.cc @@ -168,7 +168,8 @@ std::optional Substring::Fold(FoldingContext &context) { std::int64_t len = str->size(); if (ubi > len) { context.messages.Say( - "upper bound on substring (%jd) is greater than character length (%jd)"_en_US); + "upper bound on substring (%jd) is greater than character length (%jd)"_en_US, + static_cast(ubi), static_cast(len)); ubi = len; last_ = SubscriptIntegerExpr{ubi}; } -- 2.34.1