aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/layout.adb
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gcc.gnu.org>2001-12-19 01:31:42 +0100
committerGeert Bosch <bosch@gcc.gnu.org>2001-12-19 01:31:42 +0100
commit6510f4c98e33e0aac8d5ccb40c680b077ce7aa1b (patch)
treed40702acfcb4ff5d5279688dcc3cee29d5dd3741 /gcc/ada/layout.adb
parentc6d96f20fdf9caad7e3fe1939b78295241df0036 (diff)
downloadgcc-6510f4c98e33e0aac8d5ccb40c680b077ce7aa1b.zip
gcc-6510f4c98e33e0aac8d5ccb40c680b077ce7aa1b.tar.gz
gcc-6510f4c98e33e0aac8d5ccb40c680b077ce7aa1b.tar.bz2
sem_res.adb (Resolve_Selected_Component): do not generate a discriminant check if the selected component is a component...
* sem_res.adb (Resolve_Selected_Component): do not generate a discriminant check if the selected component is a component of the argument of an initialization procedure. * trans.c (tree_transform, case of arithmetic operators): If result type is private, the gnu_type is the base type of the full view, given that the full view itself may be a subtype. * sem_res.adb: Minor reformatting * trans.c (tree_transform, case N_Real_Literal): Add missing third parameter in call to Machine (unknown horrible effects from this omission). * urealp.h: Add definition of Round_Even for call to Machine Add third parameter for Machine * sem_warn.adb (Check_One_Unit): Suppress warnings completely on predefined units in No_Run_Time mode. * misc.c (insn-codes.h): Now include. * a-except.adb: Preparation work for future integration of the GCC 3 exception handling mechanism (Notify_Handled_Exception, Notify_Unhandled_Exception): New routines to factorize previous code sequences and make them externally callable, e.g. for the Ada personality routine when the GCC 3 mechanism is used. (Propagate_Exception, Raise_Current_Excep, Raise_From_Signal_Handler): Use the new notification routines. * prj-tree.ads (First_Choice_Of): Document the when others case * bindgen.adb (Gen_Ada_Init_*): Set priority of environment task in HI-E mode, in order to support Ravenscar profile properly. * cstand.adb (Create_Standard): Duration is a 32 bit type in HI-E mode on 32 bits targets. * fmap.adb: Initial version. * fmap.ads: Initial version. * fname-uf.adb (Get_File_Name): Use mapping if unit name mapped. If search is successfully done, add to mapping. * frontend.adb: Initialize the mapping if a -gnatem switch was used. * make.adb: (Gnatmake): Add new local variable Mapping_File_Name. Create mapping file when using project file(s). Delete mapping file before exiting. * opt.ads (Mapping_File_Name): New variable * osint.adb (Find_File): Use path name found in mapping, if any. * prj-env.adb (Create_Mapping_File): New procedure * prj-env.ads (Create_Mapping_File): New procedure. * switch.adb (Scan_Front_End_Switches): Add processing for -gnatem (Mapping_File) * usage.adb: Add entry for new switch -gnatem. * Makefile.in: Add dependencies for fmap.o. * sem_ch10.adb (Analyze_With_Clause): Retrieve proper entity when unit is a package instantiation rewritten as a package body. (Install_Withed_Unit): Undo previous change, now redundant. * layout.adb: (Compute_Length): Move conversion to Unsigned to callers. (Get_Max_Size): Convert Len expression to Unsigned after calls to Compute_Length and Determine_Range. (Layout_Array_Type): Convert Len expression to Unsigned after calls to Compute_Length and Determine_Range. Above changes fix problem with length computation for supernull arrays where Max (Len, 0) wasn't getting applied due to the Unsigned conversion used by Compute_Length. * rtsfind.ads: (OK_To_Use_In_No_Run_Time_Mode): Allow Ada.Exceptions and System.Secondary_Stack. (OK_To_Use_In_Ravenscar_Mode): New table needed to implement Ravenscar in HI-E mode. Remove unused entity RE_Exception_Data. * rtsfind.adb (RTE): Allow Ravenscar Profile in HI mode. * rident.ads (No_Secondary_Stack): New restriction. From-SVN: r48168
Diffstat (limited to 'gcc/ada/layout.adb')
-rw-r--r--gcc/ada/layout.adb17
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/ada/layout.adb b/gcc/ada/layout.adb
index 311a6e4..2cf97cb 100644
--- a/gcc/ada/layout.adb
+++ b/gcc/ada/layout.adb
@@ -524,13 +524,12 @@ package body Layout is
end if;
return
- Convert_To (Standard_Unsigned,
- Assoc_Add (Loc,
- Left_Opnd =>
- Assoc_Subtract (Loc,
- Left_Opnd => Hi_Op,
- Right_Opnd => Lo_Op),
- Right_Opnd => Make_Integer_Literal (Loc, 1)));
+ Assoc_Add (Loc,
+ Left_Opnd =>
+ Assoc_Subtract (Loc,
+ Left_Opnd => Hi_Op,
+ Right_Opnd => Lo_Op),
+ Right_Opnd => Make_Integer_Literal (Loc, 1));
end Compute_Length;
----------------------
@@ -749,6 +748,8 @@ package body Layout is
Set_Parent (Len, E);
Determine_Range (Len, OK, LLo, LHi);
+ Len := Convert_To (Standard_Unsigned, Len);
+
-- If we cannot verify that range cannot be super-flat,
-- we need a max with zero, since length must be non-neg.
@@ -1059,6 +1060,8 @@ package body Layout is
Set_Parent (Len, E);
Determine_Range (Len, OK, LLo, LHi);
+ Len := Convert_To (Standard_Unsigned, Len);
+
-- If range definitely flat or superflat, result size is zero
if OK and then LHi <= 0 then