https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114708
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This appears to be sufficient:
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 04d114694ab..f81380846e0 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -6076,6 +6076,12 @@ package body Exp_Util is
Utyp := Underlying_Type (Base_Type (Utyp));
+ -- Handle incomplete types
+
+ if No (Utyp) then
+ return Empty;
+ end if;
+
-- Deal with untagged derivation of private views. If the parent is
-- now known to be protected, the finalization routine is the one
-- defined on the corresponding record of the ancestor (corresponding