Commit 7e7f0b0a by Bob Duff Committed by Pierre-Marie de Rodat

[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
parent 76ccee8f
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
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment