]> git.ipfire.org Git - thirdparty/gcc.git/commit
gigi.h (get_elaboration_procedure): Declare.
authorEric Botcazou <ebotcazou@adacore.com>
Sun, 19 Sep 2010 13:48:51 +0000 (13:48 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Sun, 19 Sep 2010 13:48:51 +0000 (13:48 +0000)
commit2231f17fa0b742bec5fdcad0894d02af2ddab08c
treeb62bef407ee1a1a7c6b27d747db9b145775e6634
parenta10623fb71eb10046cbd3d7ad7dc3b9cef781666
gigi.h (get_elaboration_procedure): Declare.

* gcc-interface/gigi.h (get_elaboration_procedure): Declare.
(gnat_zaplevel): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not force global
binding level for an external constant.
<E_Constant>: Force the local context and create a fake scope before
translating the defining expression of an external constant.
<object>: Treat external constants at the global level explicitly for
renaming declarations.
(elaborate_expression_1): Force the variable to be static if the
expression is global.
* gcc-interface/trans.c (get_elaboration_procedure): New function.
(call_to_gnu): Use it.
(gnat_to_gnu): Likewise.
<N_Object_Declaration>: Do not test Is_Public to force the creation of
an initialization variable.
(add_decl_expr): Discard the statement if the declaration is external.
* gcc-interface/utils.c (gnat_pushdecl): Do not put the declaration in
the current block if it is external.
(create_var_decl_1): Do not test Is_Public to set TREE_STATIC.
(gnat_zaplevel): New global function.

From-SVN: r164416
gcc/ada/ChangeLog
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/testsuite/ChangeLog
gcc/testsuite/gnat.dg/constant1.adb [moved from gcc/testsuite/gnat.dg/const1.adb with 76% similarity]
gcc/testsuite/gnat.dg/constant2.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/constant2_pkg1.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/constant2_pkg2.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/constant2_pkg2.ads [new file with mode: 0644]