diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-20 14:02:27 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-20 14:02:27 +0000 |
commit | 6e115c3f32f8db04b49d8afc3940ce86c952dbef (patch) | |
tree | 293ddb1db09b6b8c9bf97f23c521011485ca7e64 /gcc/ada/a-cbmutr.adb | |
parent | 079729c864f1068e2eb2ef6f3cbd35a90d7f8047 (diff) | |
download | gcc-6e115c3f32f8db04b49d8afc3940ce86c952dbef.tar.gz |
2014-02-20 Robert Dewar <dewar@adacore.com>
* sem_ch12.adb (Validate_Access_Type_Instance): Add message if
mismatching predicates.
* sem_ch6.adb (Check_Conformance): Give better messages on
predicate mismatch.
* sem_eval.adb (Predicates_Match): Move to spec.
* sem_eval.ads (Predicates_Match): Moved here from body.
2014-02-20 Ed Schonberg <schonberg@adacore.com>
* a-cbmutr.adb: Use default value in Insert_Child.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207949 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cbmutr.adb')
-rw-r--r-- | gcc/ada/a-cbmutr.adb | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ada/a-cbmutr.adb b/gcc/ada/a-cbmutr.adb index 536f00afdb3..e0bcd3acafe 100644 --- a/gcc/ada/a-cbmutr.adb +++ b/gcc/ada/a-cbmutr.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2011-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2011-2013, Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1585,6 +1585,15 @@ package body Ada.Containers.Bounded_Multiway_Trees is Nodes : Tree_Node_Array renames Container.Nodes; Last : Count_Type; + Elem : Element_Type; + pragma Unmodified (Elem); + -- There is no explicit element provided, but in an instance the + -- element type may be a scalar with a Default_Value aspect, or a + -- composite type with such a scalar component, so we insert the + -- specified number of possibly initialized elements at the given + -- position. So we are declaring Elem just for this possible default + -- initialization, which is why we need the pragma Unmodified. + begin if Parent = No_Element then raise Constraint_Error with "Parent cursor has no element"; @@ -1623,7 +1632,7 @@ package body Ada.Containers.Bounded_Multiway_Trees is Initialize_Root (Container); end if; - Allocate_Node (Container, Position.Node); + Allocate_Node (Container, Elem, Position.Node); Nodes (Position.Node).Parent := Parent.Node; Last := Position.Node; |