ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 25 May 2015 14:00:28 +0000 (14:00 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 25 May 2015 14:00:28 +0000 (14:00 +0000)
commitea292448322b87fcd3f8da04467420b49f609053
treead069168b45b5aa8b35d5e2c20ccbc3558fcf80d
parent288cbbbdacf90e3da12df2fd0cffba69f66369ac
ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...

* gcc-interface/ada-tree.h (DECL_RENAMING_GLOBAL_P): Rename into...
(DECL_GLOBAL_NONCONSTANT_RENAMING_P): ...this.
* gcc-interface/gigi.h (record_global_renaming_pointer): Delete.
(invalidate_global_renaming_pointers): Likewise.
(record_global_nonconstant_renaming): New.
(invalidate_global_nonconstant_renamings): Likewise.
(get_inner_constant_reference): Likewise.
(gnat_constant_reference_p): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Adjust to above
and register the renaming pointer only if the object is non-constant.
(elaborate_expression_1): Call get_inner_constant_reference instead
of get_inner_reference.
* gcc-interface/trans.c (fold_constant_decl_in_expr): Minor tweak.
(Identifier_to_gnu): Adjust to above and do not recheck the renamed
object before substituting it.
(Compilation_Unit_to_gnu): Adjust to above renaming.  Minor tweaks.
(gnat_to_gnu) <N_Object_Renaming_Declaration>: Do not return the
result at the global level.
(N_Exception_Renaming_Declaration): Likewise.
* gcc-interface/utils.c (global_renaming_pointers): Rename into...
(global_nonconstant_renamings): ...this.
(destroy_gnat_utils): Adjust to above renaming.
(record_global_renaming_pointer): Rename into...
(record_global_nonconstant_renaming): ...this.
(invalidate_global_renaming_pointers): Rename into...
(invalidate_global_nonconstant_renamings): ...this and do not recheck
the renamed object before invalidating.
* gcc-interface/utils2.c (gnat_stabilize_reference): Minor tweak.
(get_inner_constant_reference): New public function.
(gnat_constant_reference_p): New predicate.

From-SVN: r223644
gcc/ada/ChangeLog
gcc/ada/gcc-interface/ada-tree.h
gcc/ada/gcc-interface/decl.c
gcc/ada/gcc-interface/gigi.h
gcc/ada/gcc-interface/trans.c
gcc/ada/gcc-interface/utils.c
gcc/ada/gcc-interface/utils2.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/renaming6.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/renaming6.ads [new file with mode: 0644]