diff options
-rw-r--r-- | gcc/ada/sem_util.adb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 942a77a..7b7566d 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -18952,8 +18952,9 @@ package body Sem_Util is if Has_Init_Expression (Nod) then Visit (Expression (Nod)); - elsif not Has_Preelaborable_Initialization - (Etype (Defining_Entity (Nod))) + elsif not Constant_Present (Nod) + and then not Has_Preelaborable_Initialization + (Etype (Defining_Entity (Nod))) then raise Non_Preelaborable; end if; |