[flang-commits] [flang] [flang][Semantics] Adding check integer kind on STAT= specifier #230463 (PR #231103)
Dan Bonachea via flang-commits
flang-commits at lists.llvm.org
Sun Oct 18 10:27:00 PDT 2026
================
@@ -145,6 +153,15 @@ static void CheckSyncStat(SemanticsContext &context,
context.Say( // C1172
"The stat-variable in a sync-stat-list may not be repeated"_err_en_US);
}
+ if (const auto *expr{GetExpr(context, stat)})
+ if (auto type{expr->GetType()}; type &&
+ type->category() == TypeCategory::Integer &&
+ type->kind() < 2 &&
+ context.ShouldWarn(
+ common::LanguageFeature::StatKind)) { // F2023 9.7.4 p1
+ context.Say(
+ "The stat-variable must have an integer kind of at least 16-bit"_warn_en_US);
+ }
----------------
bonachea wrote:
@JDPailleux I think this thread can also be resolved now, correct?
https://github.com/llvm/llvm-project/pull/231103
More information about the flang-commits
mailing list