utils.c (create_var_decl_1): Relax expectations on the PUBLIC_FLAG argument...
authorOlivier Hainque <hainque@adacore.com>
Thu, 17 Jul 2008 14:18:27 +0000 (14:18 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Thu, 17 Jul 2008 14:18:27 +0000 (14:18 +0000)
commita7a46bb2d96c538337c19f5ba9bb55fb7b34c726
tree3b74d3ff953a20ee785835248912fbefebafef7c
parent711b299844b8eb77451d96a360f4525fc005279e
utils.c (create_var_decl_1): Relax expectations on the PUBLIC_FLAG argument...

ada/
* utils.c (create_var_decl_1): Relax expectations on the PUBLIC_FLAG
argument, to apply to references in addition to definitions.  Prevent
setting TREE_STATIC on externals.
(gnat_pushdecl): Always clear DECL_CONTEXT on public externals.

testsuite/
* gnat.dg/tree_static_def.ad[bs]: Support for ...
* gnat.dg/tree_static_use.adb: New test.
* gnat.dg/decl_ctx_def.ads: Support for ...
* gnat.dg/decl_ctx_use.ad[bs]: New test.

From-SVN: r137923
gcc/ada/ChangeLog
gcc/ada/utils.c
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/decl_ctx_def.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/decl_ctx_use.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/decl_ctx_use.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/tree_static_def.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/tree_static_def.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/tree_static_use.adb [new file with mode: 0644]