From aa7c104124ac4a8da12fbd25c797bc8ab438c545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Clement=20=28=E3=83=90=E3=83=AC=E3=83=B3?= =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=B3=20=E3=82=AF=E3=83=AC=E3=83=A1?= =?UTF-8?q?=E3=83=B3=29?= Date: Fri, 19 Apr 2024 12:47:40 -0700 Subject: [flang][cuda] Allow fixed size array with the managed attribute (#89436) Fixed size array and scalar should be allowed with the `managed` attribute. --- flang/lib/Semantics/check-declarations.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'flang/lib/Semantics/check-declarations.cpp') diff --git a/flang/lib/Semantics/check-declarations.cpp b/flang/lib/Semantics/check-declarations.cpp index 875929e..adbd21d 100644 --- a/flang/lib/Semantics/check-declarations.cpp +++ b/flang/lib/Semantics/check-declarations.cpp @@ -956,9 +956,9 @@ void CheckHelper::CheckObjectEntity( break; case common::CUDADataAttr::Managed: if (!IsAutomatic(symbol) && !IsAllocatable(symbol) && - !details.isDummy()) { + !details.isDummy() && !evaluate::IsExplicitShape(symbol)) { messages_.Say( - "Object '%s' with ATTRIBUTES(MANAGED) must also be allocatable, automatic, or a dummy argument"_err_en_US, + "Object '%s' with ATTRIBUTES(MANAGED) must also be allocatable, automatic, explicit shape, or a dummy argument"_err_en_US, symbol.name()); } break; -- cgit v1.1