diff options
author | Bob Duff <duff@adacore.com> | 2017-10-20 14:51:32 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2017-10-20 14:51:32 +0000 |
commit | 3a248f7cecb43333923d6b2f89a1acb4e6b3dd6e (patch) | |
tree | b2cf43fedb32b08b3914d887a1598dbdd503a018 /gcc/ada/sinfo.adb | |
parent | 2185b58266f1c4b0b14a32ef1585f129ae42d9db (diff) | |
download | gcc-3a248f7cecb43333923d6b2f89a1acb4e6b3dd6e.zip gcc-3a248f7cecb43333923d6b2f89a1acb4e6b3dd6e.tar.gz gcc-3a248f7cecb43333923d6b2f89a1acb4e6b3dd6e.tar.bz2 |
sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate that an allocator came from a b-i-p return statement.
2017-10-20 Bob Duff <duff@adacore.com>
* sinfo.ads, sinfo.adb (Alloc_For_BIP_Return): New flag to indicate
that an allocator came from a b-i-p return statement.
* exp_ch4.adb (Expand_Allocator_Expression): Avoid adjusting the return
object of a nonlimited build-in-place function call.
* exp_ch6.adb (Expand_N_Extended_Return_Statement): Set the
Alloc_For_BIP_Return flag on generated allocators.
* sem_ch5.adb (Analyze_Assignment): Move Assert to where it can't fail.
If the N_Assignment_Statement has been transformed into something else,
then Should_Transform_BIP_Assignment won't work.
* exp_ch3.adb (Expand_N_Object_Declaration): A previous revision said,
"Remove Adjust if we're building the return object of an extended
return statement in place." Back out that part of the change, because
the Alloc_For_BIP_Return flag is now used for that.
From-SVN: r253940
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r-- | gcc/ada/sinfo.adb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index e4f8608..dc4e8fb 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -203,6 +203,14 @@ package body Sinfo is return Flag4 (N); end Aliased_Present; + function Alloc_For_BIP_Return + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Allocator); + return Flag1 (N); + end Alloc_For_BIP_Return; + function All_Others (N : Node_Id) return Boolean is begin @@ -3626,6 +3634,14 @@ package body Sinfo is Set_Flag4 (N, Val); end Set_Aliased_Present; + procedure Set_Alloc_For_BIP_Return + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Allocator); + Set_Flag1 (N, Val); + end Set_Alloc_For_BIP_Return; + procedure Set_All_Others (N : Node_Id; Val : Boolean := True) is begin |