diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-24 15:07:09 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-24 15:07:09 +0000 |
commit | 54c625050e1f4836d5b250c82723e34eafd184a7 (patch) | |
tree | 122167c89fc81d8688b17d1d508f3c1a21a863a6 /gcc/ada/sem_ch12.adb | |
parent | 019885b01e1cc568f8309fe653b973f1195a3e63 (diff) | |
download | gcc-54c625050e1f4836d5b250c82723e34eafd184a7.tar.gz |
2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
* gnat_ugn.texi: Misc updates.
2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
* exp_prag.adb (Expand_Old): Set the type of the generated temporary.
2014-02-24 Gary Dismukes <dismukes@adacore.com>
* layout.adb (Layout_Variant_Record): Instantiate
Generic_Check_Choices and call Check_Choices before calling
Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
set to prevent generating incorrect discriminant-checking
functions for 'others' variants (functions that unconditionally
return True rather than accounting for the values covered by the
'others' choice).
* sem_eval.ads (Subtypes_Statically_Compatible): Add formal
Formal_Derived_Matching.
(Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
* sem_eval.adb (Subtypes_Statically_Compatible): Pass new
Formal_Derived_Matching formal to Subtypes_Statically_Match.
(Subtypes_Statically_Match): Suppress the Object_Size matching
test in the case where Formal_Derived_Matching is True.
* sem_ch12.adb (Validate_Derived_Type_Instance): Pass
True for Formal_Derived_Matching_Formal on the call to
Subtypes_Statically_Compatible.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208068 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch12.adb')
-rw-r--r-- | gcc/ada/sem_ch12.adb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 54df193ab8b..59fc323b349 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -11124,7 +11124,9 @@ package body Sem_Ch12 is Abandon_Instantiation (Actual); end if; - if not Subtypes_Statically_Compatible (Act_T, Ancestor) then + if not Subtypes_Statically_Compatible + (Act_T, Ancestor, Formal_Derived_Matching => True) + then Error_Msg_N ("constraint on actual is incompatible with formal", Actual); Abandon_Instantiation (Actual); |