diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-12 10:49:07 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-11-12 10:49:07 +0000 |
commit | 3ea9a9382fd8b53498a796d4593cb0c2f35d797b (patch) | |
tree | 5880809a3b63cbdcf8b9c08e4e12e0e0ba4df858 /gcc/ada/sem_ch3.adb | |
parent | 1d3f0c6b8d73afcc5c7e83ed366e65cfa9c14b91 (diff) | |
download | gcc-3ea9a9382fd8b53498a796d4593cb0c2f35d797b.tar.gz |
2015-11-12 Emmanuel Briot <briot@adacore.com>
* s-os_lib.ads: Documentation update.
2015-11-12 Arnaud Charlet <charlet@adacore.com>
* s-taprop-vxworks.adb, s-osinte-vxworks.ads: Use a single import of
taskDelay to avoid confusion.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* exp_ch6.adb (Expand_Simple_Function_Return): If the return
type is class-wide and the expression is a view conversion,
remove the conversion to prevent overriding of the tag, which
must be that of the object being returned.
2015-11-12 Tristan Gingold <gingold@adacore.com>
* bindgen.adb (Gen_Adainit): Code cleanup.
2015-11-12 Hristian Kirtchev <kirtchev@adacore.com>
* s-stalib.ads: Code cleanup.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb (Analyze_Incomplete_Type_Decl): small optimization.
(Analyze_Subtype_Declaration): For floating point types,
inherit dimensions.
(OK_For_Limited_Init_In_05): Handle properly a conditional
expression whose condition is static, and is rewritten as the
branch that will be executed.
2015-11-12 Ed Schonberg <schonberg@adacore.com>
* sem_attr.adb (Resolve_Attribute, case 'Access): If the context
type is an access constant type, do not mark the attribute
reference as a possible modification of the prefix.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@230226 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index 881921d5d69..0c01cebb944 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -3043,16 +3043,14 @@ package body Sem_Ch3 is Set_Direct_Primitive_Operations (T, New_Elmt_List); end if; - Push_Scope (T); - Set_Stored_Constraint (T, No_Elist); if Present (Discriminant_Specifications (N)) then + Push_Scope (T); Process_Discriminants (N); + End_Scope; end if; - End_Scope; - -- If the type has discriminants, non-trivial subtypes may be -- declared before the full view of the type. The full views of those -- subtypes will be built after the full view of the type. @@ -4833,6 +4831,7 @@ package body Sem_Ch3 is Set_Scalar_Range (Id, Scalar_Range (T)); Set_Digits_Value (Id, Digits_Value (T)); Set_Is_Constrained (Id, Is_Constrained (T)); + Copy_Dimensions (From => T, To => Id); when Signed_Integer_Kind => Set_Ekind (Id, E_Signed_Integer_Subtype); @@ -18625,6 +18624,16 @@ package body Sem_Ch3 is -- dereference. The function may also be parameterless, in which case -- the source node is just an identifier. + -- A branch of a conditional expression may have been removed if the + -- condition is statically known. This happens during expansion, and + -- thus will not happen if previous errors were encountered. The check + -- will have been performed on the chosen branch, which replaces the + -- original conditional expression. + + if No (Exp) then + return True; + end if; + case Nkind (Original_Node (Exp)) is when N_Aggregate | N_Extension_Aggregate | N_Function_Call | N_Op => return True; |