forked from OSchip/llvm-project
[flang] Accept NULL() in struct constructor for ALLOCATABLE component
Original-commit: flang-compiler/f18@7aee0e4852 Reviewed-on: https://github.com/flang-compiler/f18/pull/590 Tree-same-pre-rewrite: false
This commit is contained in:
parent
14f693fb94
commit
6da0d748d5
|
@ -1357,6 +1357,9 @@ MaybeExpr ExpressionAnalyzer::Analyze(
|
|||
} else if (MaybeExpr converted{
|
||||
ConvertToType(*symbol, std::move(*value))}) {
|
||||
result.Add(*symbol, std::move(*converted));
|
||||
} else if (IsAllocatable(*symbol) &&
|
||||
std::holds_alternative<NullPointer>(value->u)) {
|
||||
// NULL() with no arguments allowed by 7.5.10 para 6 for ALLOCATABLE
|
||||
} else if (auto symType{DynamicType::From(symbol)}) {
|
||||
if (valueType.has_value()) {
|
||||
if (auto *msg{Say(expr.source,
|
||||
|
|
Loading…
Reference in New Issue