]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* layout.adb:
authorGary Dismukes <dismukes@gnat.com>
Wed, 5 Dec 2001 02:00:43 +0000 (02:00 +0000)
committerGeert Bosch <bosch@gcc.gnu.org>
Wed, 5 Dec 2001 02:00:43 +0000 (03:00 +0100)
(Get_Max_Size): Fix "start of processing" comment to say Get_Max_Size.
(Discrimify): Go back to setting the Etypes of the selected component
because the Vname component does not exist at this point and will
fail name resolution. Also set Analyzed.
Remove with and use of Sem_Res.

From-SVN: r47648

gcc/ada/ChangeLog
gcc/ada/layout.adb

index 4e5301a83f8fc9095e2e0cc11ed0bd1b80f018c7..ec3174429ef3d795c2ac7a78b0e4ace877482bd1 100644 (file)
@@ -1,3 +1,12 @@
+2001-12-04  Gary Dismukes <dismukes@gnat.com>
+       
+       * layout.adb:
+       (Get_Max_Size): Fix "start of processing" comment to say Get_Max_Size.
+       (Discrimify): Go back to setting the Etypes of the selected component
+       because the Vname component does not exist at this point and will 
+       fail name resolution. Also set Analyzed.
+       Remove with and use of Sem_Res.
+
 2001-12-04  Arnaud Charlet <charlet@gnat.com>
 
        * Makefile.in: (HIE_SOURCES): add s-fat*.
index f4c1754c2325f99dc4c13dd6a96599921e12a4d3..b3c5401e0bc993a94f965d64b21c78410eb56863 100644 (file)
@@ -39,7 +39,7 @@ with Repinfo;  use Repinfo;
 with Sem;      use Sem;
 with Sem_Ch13; use Sem_Ch13;
 with Sem_Eval; use Sem_Eval;
-with Sem_Res;  use Sem_Res;
+--  with Sem_Res;  use Sem_Res;
 with Sem_Util; use Sem_Util;
 with Sinfo;    use Sinfo;
 with Snames;   use Snames;
@@ -638,7 +638,7 @@ package body Layout is
          end if;
       end Min_Discrim;
 
-   --  Start of processing for Layout_Array_Type
+   --  Start of processing for Get_Max_Size
 
    begin
       pragma Assert (Size_Depends_On_Discriminant (E));
@@ -903,7 +903,13 @@ package body Layout is
                 Prefix        => Make_Identifier (Loc, Chars => Vname),
                 Selector_Name => New_Occurrence_Of (Entity (N), Loc));
 
-            Analyze_And_Resolve (N, Typ);
+            --  Set the Etype attributes of the selected name and its prefix.
+            --  Analyze_And_Resolve can't be called here because the Vname
+            --  entity denoted by the prefix will not yet exist (it's created
+            --  by SO_Ref_From_Expr, called at the end of Layout_Array_Type).
+
+            Set_Etype (Prefix (N), Vtyp);
+            Set_Etype (N, Typ);
          end if;
       end Discrimify;