diff options
author | Ed Schonberg <schonber@gnat.com> | 2001-10-26 00:47:09 +0000 |
---|---|---|
committer | Geert Bosch <bosch@gcc.gnu.org> | 2001-10-26 02:47:09 +0200 |
commit | 6f311316194c0494cc43c16be10b434ca562a8df (patch) | |
tree | 462c2d3c04ef8d1af6b4bfa9dae21d294b940467 | |
parent | 17be0cdf52730f68542fbca09480dcde990b92b8 (diff) | |
download | gcc-6f311316194c0494cc43c16be10b434ca562a8df.zip gcc-6f311316194c0494cc43c16be10b434ca562a8df.tar.gz gcc-6f311316194c0494cc43c16be10b434ca562a8df.tar.bz2 |
sem_res.adb (Resolve_Call): if the call is actually an indexing operation on the result of a parameterless...
* sem_res.adb (Resolve_Call): if the call is actually an indexing
operation on the result of a parameterless call, perform elaboration
check after the node has been properly rewritten.
* sem_ch12.adb (Copy_Generic_Node): after the proper body has been
inlined within the generic tree, the defining identifier is not a
compilation_unit.
From-SVN: r46510
-rw-r--r-- | gcc/ada/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/ada/sem_ch12.adb | 3 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 2 |
3 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index b6d4909..4e0ae19 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,5 +1,15 @@ 2001-10-25 Ed Schonberg <schonber@gnat.com> + * sem_res.adb (Resolve_Call): if the call is actually an indexing + operation on the result of a parameterless call, perform elaboration + check after the node has been properly rewritten. + + * sem_ch12.adb (Copy_Generic_Node): after the proper body has been + inlined within the generic tree, the defining identifier is not a + compilation_unit. + +2001-10-25 Ed Schonberg <schonber@gnat.com> + * sem_res.adb (Resolve): special-case resolution of Null in an instance or an inlined body to avoid view conflicts. diff --git a/gcc/ada/sem_ch12.adb b/gcc/ada/sem_ch12.adb index 8c868b2..4d372d6 100644 --- a/gcc/ada/sem_ch12.adb +++ b/gcc/ada/sem_ch12.adb @@ -4499,9 +4499,10 @@ package body Sem_Ch12 is Empty, Instantiating => False); -- Now place the original proper body in the original - -- generic unit. + -- generic unit. This is a body, not a compilation unit. Rewrite (N, Proper_Body (Unit (Subunit))); + Set_Is_Compilation_Unit (Defining_Entity (N), False); Set_Was_Originally_Stub (N); -- Finally replace the body of the subunit with its copy, diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index ef4ca9e..bf1a715 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -3130,7 +3130,6 @@ package body Sem_Res is Index_Node : Node_Id; begin - Check_Elab_Call (N); if Component_Type (Etype (Nam)) /= Any_Type then Index_Node := @@ -3147,6 +3146,7 @@ package body Sem_Res is Set_Etype (Prefix (N), Etype (Nam)); Set_Etype (N, Typ); Resolve_Indexed_Component (N, Typ); + Check_Elab_Call (Prefix (N)); end if; return; |