aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2019-10-10 15:24:38 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-10-10 15:24:38 +0000
commitdfdd3de1238531889e65fc4c5498a3a5f28ff570 (patch)
treeb295ef1b31d93d98e07348986e0b442bdc77ea08 /gcc/ada
parentab9e20840f3ae9c5fe731851c6a384cd4f01f844 (diff)
downloadgcc-dfdd3de1238531889e65fc4c5498a3a5f28ff570.zip
gcc-dfdd3de1238531889e65fc4c5498a3a5f28ff570.tar.gz
gcc-dfdd3de1238531889e65fc4c5498a3a5f28ff570.tar.bz2
[Ada] Fix awkward placement of freeze node for actual subtype
2019-10-10 Eric Botcazou <ebotcazou@adacore.com> gcc/ada/ * sem_ch6.adb (Set_Actual_Subtypes): Put the freeze node of the actual subtype after its declaration when the type of the formal has a predicate. From-SVN: r276828
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog13
-rw-r--r--gcc/ada/sem_ch6.adb2
2 files changed, 4 insertions, 11 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 3d58a8d..449c0ab 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,12 +1,5 @@
2019-10-10 Eric Botcazou <ebotcazou@adacore.com>
- * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Do not use
- the Esize of the component to compute its layout, but only the
- Component_Clause. Do not issue a warning for the _Tag
- component. Also set the Esize of the component at the end of
- the layout.
- (Analyze_Record_Representation_Clause): Remove Hbit local
- variable. Lay out the Original_Record_Component only if it's
- distinct from the component.
- (Check_Record_Representation_Clause): Fix off-by-one bug for the
- Last_Bit of the artificial clause built for the _Tag component. \ No newline at end of file
+ * sem_ch6.adb (Set_Actual_Subtypes): Put the freeze node of the
+ actual subtype after its declaration when the type of the formal
+ has a predicate. \ No newline at end of file
diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb
index eb6768d..b96a5fd 100644
--- a/gcc/ada/sem_ch6.adb
+++ b/gcc/ada/sem_ch6.adb
@@ -12038,7 +12038,7 @@ package body Sem_Ch6 is
-- predicate may come from an explicit aspect of be inherited.
elsif Has_Predicates (T) then
- Insert_List_Before_And_Analyze (Decl,
+ Insert_List_After_And_Analyze (Decl,
Freeze_Entity (Defining_Identifier (Decl), N));
end if;