diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-07-04 12:00:57 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2016-07-04 12:00:57 +0200 |
commit | 10edebe7b49ee1903bca94e03d4cf9c8194c3905 (patch) | |
tree | 8d1354391447c45564cc3f27fcc976c07d89e6bd /gcc/ada/sinfo.adb | |
parent | 15f6e0dac34a243341fba80f8ebdaeec78d766fe (diff) | |
download | gcc-10edebe7b49ee1903bca94e03d4cf9c8194c3905.zip gcc-10edebe7b49ee1903bca94e03d4cf9c8194c3905.tar.gz gcc-10edebe7b49ee1903bca94e03d4cf9c8194c3905.tar.bz2 |
[multiple changes]
2016-07-04 Hristian Kirtchev <kirtchev@adacore.com>
* exp_aggr.adb (Ctrl_Init_Expression): New routine.
(Gen_Assign): Code cleanup. Perform in-place side effect removal when
the expression denotes a controlled function call.
* exp_util.adb (Remove_Side_Effects): Do not remove side effects
on a function call which has this behavior suppressed.
* sem_aggr.adb Code cleanup.
* sinfo.adb (No_Side_Effect_Removal): New routine.
(Set_Side_Effect_Removal): New routine.
* sinfo.ads New attribute No_Side_Effect_Removal along with
occurences in nodes.
(No_Side_Effect_Removal): New routine along with pragma Inline.
(Set_Side_Effect_Removal): New routine along with pragma Inline.
2016-07-04 Arnaud Charlet <charlet@adacore.com>
* opt.ads, sem_prag.adb (Universal_Addressing_On_AAMP): Removed.
Remove support for pragma No_Run_Time. Update comments.
2016-07-04 Pascal Obry <obry@adacore.com>
* g-forstr.ads: More documentation for the Formatted_String
support.
2016-07-04 Ed Schonberg <schonberg@adacore.com>
* exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
'Address): If the address comes from an aspect specification
and not a source attribute definition clause, do not remove
side effects from the expression, because the expression must
be elaborated at the freeze point of the object and not at the
object declaration, because of the delayed analysis of aspect
specifications.
From-SVN: r237959
Diffstat (limited to 'gcc/ada/sinfo.adb')
-rw-r--r-- | gcc/ada/sinfo.adb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ada/sinfo.adb b/gcc/ada/sinfo.adb index f8ed04c..5ea25db 100644 --- a/gcc/ada/sinfo.adb +++ b/gcc/ada/sinfo.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2015, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2016, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -2409,6 +2409,14 @@ package body Sinfo is return Flag17 (N); end No_Minimize_Eliminate; + function No_Side_Effect_Removal + (N : Node_Id) return Boolean is + begin + pragma Assert (False + or else NT (N).Nkind = N_Function_Call); + return Flag1 (N); + end No_Side_Effect_Removal; + function No_Truncation (N : Node_Id) return Boolean is begin @@ -5664,6 +5672,14 @@ package body Sinfo is Set_Flag17 (N, Val); end Set_No_Minimize_Eliminate; + procedure Set_No_Side_Effect_Removal + (N : Node_Id; Val : Boolean := True) is + begin + pragma Assert (False + or else NT (N).Nkind = N_Function_Call); + Set_Flag1 (N, Val); + end Set_No_Side_Effect_Removal; + procedure Set_No_Truncation (N : Node_Id; Val : Boolean := True) is begin |