diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-27 10:14:09 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-27 10:14:09 +0000 |
commit | 9f8bf1ca3a2d61719fb8c9ab3fc48d7727f140c8 (patch) | |
tree | 9ba787cc67adf604f65435853654852bdb8b7e07 /gcc | |
parent | e8e19f5d418b3f0facf7f078b7a13400a16832c6 (diff) | |
download | gcc-9f8bf1ca3a2d61719fb8c9ab3fc48d7727f140c8.tar.gz |
2008-05-27 Ed Schonberg <schonberg@adacore.com>
* sem_ch3.adb:
(Get_Discr_Value): Remove obsolete code that failed to find the value
of a discriminant for an inherited task component appearing in a type
extension.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136001 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_ch3.adb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb index de0806a1596..a375eedee7c 100644 --- a/gcc/ada/sem_ch3.adb +++ b/gcc/ada/sem_ch3.adb @@ -9850,7 +9850,6 @@ package body Sem_Ch3 is function Get_Discr_Value (Discrim : Entity_Id) return Node_Id is D : Entity_Id; E : Elmt_Id; - G : Elmt_Id; begin -- The discriminant may be declared for the type, in which case we @@ -9880,14 +9879,15 @@ package body Sem_Ch3 is -- to one: one new discriminant can constrain several old ones. In -- that case, scan sequentially the stored_constraint, the list of -- discriminants of the parents, and the constraints. + -- Previous code checked for the present of the Stored_Constraint + -- list for the derived type, but did not use it at all. Should it + -- be present when the component is a discriminated task type? if Is_Derived_Type (Typ) - and then Present (Stored_Constraint (Typ)) and then Scope (Entity (Discrim)) = Etype (Typ) then D := First_Discriminant (Etype (Typ)); E := First_Elmt (Constraints); - G := First_Elmt (Stored_Constraint (Typ)); while Present (D) loop if D = Entity (Discrim) then return Node (E); @@ -9895,7 +9895,6 @@ package body Sem_Ch3 is Next_Discriminant (D); Next_Elmt (E); - Next_Elmt (G); end loop; end if; |