summaryrefslogtreecommitdiff
path: root/gcc/ada/sem_ch3.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-25 15:18:38 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-25 15:18:38 +0000
commit86d32751c892c00803ee5f7b2b4956828c5f72fd (patch)
treea81062ae0baf3aa2bb0c6da8826d7061c88ae465 /gcc/ada/sem_ch3.adb
parentaf6f2cb79134ace14b22612ac5a0669917ddf83a (diff)
downloadgcc-86d32751c892c00803ee5f7b2b4956828c5f72fd.tar.gz
2014-02-25 Robert Dewar <dewar@adacore.com>
* einfo.ads, einfo.adb (Has_Shift_Operator): New flag. * gnat_rm.texi: Document pragma Provide_Shift_Operators. * interfac.ads: Minor code reorganization (add pragma Compiler_Unit_Warning). * par-prag.adb: Add dummy entry for Provide_Shift_Operators. * sem_ch3.adb (Build_Derived_Numeric_Type): Copy Has_Shift_Operator flag. * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure Check_Shift is always called (Check_Shift): Set Has_Shift_Operator. * sem_prag.adb: Implement pragma Provide_Shift_Operators. * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators Add entry for Name_Amount. * checks.adb (Selected_Range_Checks): When checking for a null range, make sure we use the base type, and not the subtype for deciding a range is null. * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check for suspicious loop bound which is outside the range of the loop subtype. * gnat_ugn.texi: Add documentation section "Determining the Chosen Elaboration Order" * sem_ch13.adb (UC_Entry): Add field Act_Unit (Validate_Unchecked_Conversion): Store Act_Unit (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit * treepr.adb: Minor reformatting. 2014-02-25 Arnaud Charlet <charlet@adacore.com> * usage.adb: Minor: fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208138 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_ch3.adb')
-rw-r--r--gcc/ada/sem_ch3.adb7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb
index e7c9167b460..ad7d88033d7 100644
--- a/gcc/ada/sem_ch3.adb
+++ b/gcc/ada/sem_ch3.adb
@@ -6401,6 +6401,11 @@ package body Sem_Ch3 is
end if;
end if;
+ if Is_Integer_Type (Parent_Type) then
+ Set_Has_Shift_Operator
+ (Implicit_Base, Has_Shift_Operator (Parent_Type));
+ end if;
+
-- The type of the bounds is that of the parent type, and they
-- must be converted to the derived type.
@@ -14807,7 +14812,7 @@ package body Sem_Ch3 is
if Parent_Type = Any_Type
or else Etype (Parent_Type) = Any_Type
or else (Is_Class_Wide_Type (Parent_Type)
- and then Etype (Parent_Type) = T)
+ and then Etype (Parent_Type) = T)
then
-- If Parent_Type is undefined or illegal, make new type into a
-- subtype of Any_Type, and set a few attributes to prevent cascaded