From 7806a9ed84c45d9424667c07e3501a618d763050 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 7 Jan 2015 08:45:17 +0000 Subject: [PATCH] freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic component type as to Has_Atomic_Components type. 2015-01-07 Eric Botcazou * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic component type as to Has_Atomic_Components type. Remove useless test on Is_Aliased component type. From-SVN: r219281 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/freeze.adb | 15 ++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 39b2009..bceb082 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2015-01-07 Eric Botcazou + + * freeze.adb (Freeze_Array_Type): Apply same handling to Is_Atomic + component type as to Has_Atomic_Components type. Remove useless + test on Is_Aliased component type. + 2015-01-07 Hristian Kirtchev * alloc.ads Alphabetize several declarations. Add constants diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 52d1118..a8acdc3 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -2431,12 +2431,12 @@ package body Freeze is end if; end; - -- Check for Atomic_Components or Aliased with unsuitable packing - -- or explicit component size clause given. + -- Check for Aliased or Atomic_Components/Atomic with unsuitable + -- packing or explicit component size clause given. - if (Has_Atomic_Components (Arr) + if (Has_Aliased_Components (Arr) or else - Has_Aliased_Components (Arr)) + Has_Atomic_Components (Arr) or else Is_Atomic (Ctyp)) and then (Has_Component_Size_Clause (Arr) or else Is_Packed (Arr)) then @@ -2503,13 +2503,10 @@ package body Freeze is then null; - elsif Has_Aliased_Components (Arr) - or else Is_Aliased (Ctyp) - then + elsif Has_Aliased_Components (Arr) then Complain_CS ("aliased"); - elsif Has_Atomic_Components (Arr) - or else Is_Atomic (Ctyp) + elsif Has_Atomic_Components (Arr) or else Is_Atomic (Ctyp) then Complain_CS ("atomic"); end if; -- 2.7.4