diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-10-16 17:14:46 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-11-07 10:15:04 +0100 |
commit | de4f7051af5a00c3127cfd5c77f1a5b6d4000e42 (patch) | |
tree | 71478c7a4853dcf4b905d80f965d76414e61b7e9 /gcc | |
parent | 36fcb4b93003d9eb135564d3eb0d07f27a3e2c47 (diff) | |
download | gcc-de4f7051af5a00c3127cfd5c77f1a5b6d4000e42.zip gcc-de4f7051af5a00c3127cfd5c77f1a5b6d4000e42.tar.gz gcc-de4f7051af5a00c3127cfd5c77f1a5b6d4000e42.tar.bz2 |
ada: Fix expansion of type aspects with handling of aspects
The new handling of aspects stores the aspect expression as the
Expression_Copy of the aspect and not as the Entity of the aspect
identified. This has been changed for most of the aspects, but not for
Type_Invariant and Default_Initial_Condition, which have custom
expansion. Apparently this change only affects GNATprove and not GNAT.
gcc/ada/
* exp_util.adb (Add_Own_DIC, Add_Own_Invariants): Store the aspect
expression in Expression_Copy.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_util.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb index 3e8d599..730889c 100644 --- a/gcc/ada/exp_util.adb +++ b/gcc/ada/exp_util.adb @@ -1893,7 +1893,7 @@ package body Exp_Util is -- routines. if Present (DIC_Asp) then - Set_Entity (Identifier (DIC_Asp), New_Copy_Tree (Expr)); + Set_Expression_Copy (DIC_Asp, New_Copy_Tree (Expr)); end if; -- Once the DIC assertion expression is fully processed, add a check @@ -3153,7 +3153,7 @@ package body Exp_Util is -- Check_Aspect_At_xxx routines. if Present (Prag_Asp) then - Set_Entity (Identifier (Prag_Asp), New_Copy_Tree (Expr)); + Set_Expression_Copy (Prag_Asp, New_Copy_Tree (Expr)); end if; Add_Invariant_Check (Prag, Expr, Checks); |