summaryrefslogtreecommitdiffstats
path: root/gcc/ada/sem_util.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-23 08:29:15 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-07-23 08:29:15 +0000
commit094ed68ebd38ad7a360275028a817a13e0b59e40 (patch)
treefa206e9a194b8c244a908d5e6ea375765a2ea9a2 /gcc/ada/sem_util.adb
parent1630f2a9f04520977f3c57bdd13913df522a8974 (diff)
downloadppe42-gcc-094ed68ebd38ad7a360275028a817a13e0b59e40.tar.gz
ppe42-gcc-094ed68ebd38ad7a360275028a817a13e0b59e40.zip
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Analyze_Selected_Component): When checking for potential ambiguities with class-wide operations on synchronized types, attach the copied node properly to the tree, to prevent errors during expansion. 2012-07-23 Yannick Moy <moy@adacore.com> * sem_ch5.adb (Analyze_Loop_Statement): Make sure the loop body is analyzed in Alfa mode. 2012-07-23 Ed Schonberg <schonberg@adacore.com> * sem_res.adb: Adjust previous change. 2012-07-23 Vincent Pucci <pucci@adacore.com> * sem_ch9.adb (Allows_Lock_Free_Implementation): Flag Lock_Free_Given renames previous flag Complain. Description updated. Henceforth, catch every error messages issued by this routine when Lock_Free_Given is True. Declaration restriction updated: No non-elementary parameter instead (even in parameter) New subprogram body restrictions implemented: No allocator, no address, import or export rep items, no delay statement, no goto statement, no quantified expression and no dereference of access value. 2012-07-23 Hristian Kirtchev <kirtchev@adacore.com> * checks.adb (Determine_Range): Add local variable Btyp. Handle the case where the base type of an enumeration subtype is private. Replace all occurrences of Base_Type with Btyp. * exp_attr.adb (Attribute_Valid): Handle the case where the base type of an enumeration subtype is private. Replace all occurrences of Base_Type with Btyp. * sem_util.adb (Get_Enum_Lit_From_Pos): Add local variable Btyp. Handle the case where the base type of an enumeration subtype is private. Replace all occurrences of Base_Type with Btyp. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189775 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/sem_util.adb')
-rw-r--r--gcc/ada/sem_util.adb9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index bd53144c7eb..8675d54d35a 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -4500,7 +4500,8 @@ package body Sem_Util is
Pos : Uint;
Loc : Source_Ptr) return Node_Id
is
- Lit : Node_Id;
+ Btyp : Entity_Id := Base_Type (T);
+ Lit : Node_Id;
begin
-- In the case where the literal is of type Character, Wide_Character
@@ -4522,7 +4523,11 @@ package body Sem_Util is
--
else
- Lit := First_Literal (Base_Type (T));
+ if Is_Private_Type (Btyp) and then Present (Full_View (Btyp)) then
+ Btyp := Full_View (Btyp);
+ end if;
+
+ Lit := First_Literal (Btyp);
for J in 1 .. UI_To_Int (Pos) loop
Next_Literal (Lit);
end loop;
OpenPOWER on IntegriCloud