aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2019-08-20 09:49:32 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-20 09:49:32 +0000
commit7e7f0b0a1df83dd65810a057b5ce4d01618d2fa3 (patch)
treeca2c536050580d7137170f4a1d37b9e1f2a0ce96
parent76ccee8fc7a60a19578e1901d431d628eb0214a9 (diff)
downloadgcc-7e7f0b0a1df83dd65810a057b5ce4d01618d2fa3.zip
gcc-7e7f0b0a1df83dd65810a057b5ce4d01618d2fa3.tar.gz
gcc-7e7f0b0a1df83dd65810a057b5ce4d01618d2fa3.tar.bz2
[Ada] Improve generated code for initialization of atomics
This patch makes the temp for initialization of an atomic variable be constant. No change in behavior; no test. 2019-08-20 Bob Duff <duff@adacore.com> gcc/ada/ * freeze.adb (Is_Atomic_VFA_Aggregate): Make the temp for initialization of the atomic variable be constant. This is cleaner, and might improve efficiency. From-SVN: r274728
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/freeze.adb1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 82dd6a1..7affa92 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-20 Bob Duff <duff@adacore.com>
+
+ * freeze.adb (Is_Atomic_VFA_Aggregate): Make the temp for
+ initialization of the atomic variable be constant. This is
+ cleaner, and might improve efficiency.
+
2019-08-20 Eric Botcazou <ebotcazou@adacore.com>
* repinfo.adb (List_Record_Info): In -gnatR4 mode, set the
diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb
index 70f4b9d..bb17e42 100644
--- a/gcc/ada/freeze.adb
+++ b/gcc/ada/freeze.adb
@@ -1771,6 +1771,7 @@ package body Freeze is
New_N :=
Make_Object_Declaration (Loc,
Defining_Identifier => Temp,
+ Constant_Present => True,
Object_Definition => New_Occurrence_Of (Typ, Loc),
Expression => Relocate_Node (N));
Insert_Before (Par, New_N);