aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/decl.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-06-14 14:09:38 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-06-14 10:09:38 -0400
commit966389eeaaf6b674bbfbdc34b06314c2dd7f8591 (patch)
tree4a73e45526ddb48295d919dce3f9ab9d54d0cdea /gcc/ada/decl.c
parent715f8bb802ecb1ab114f8b904fa376f40ccb50c7 (diff)
downloadgcc-966389eeaaf6b674bbfbdc34b06314c2dd7f8591.zip
gcc-966389eeaaf6b674bbfbdc34b06314c2dd7f8591.tar.gz
gcc-966389eeaaf6b674bbfbdc34b06314c2dd7f8591.tar.bz2
ada-tree.def (LOOP_STMT, EXIT_STMT): Update documentation.
* ada-tree.def (LOOP_STMT, EXIT_STMT): Update documentation. * ada-tree.h (EXIT_STMT_LABEL): Renamed from EXIT_STMT_LOOP. * decl.c (gnat_to_gnu_entity): Also set force_global for imported subprograms. * trans.c (gnu_loop_label_stack): Renamed from gnu_loop_stmt_stack; all callers changed. (gnat_to_gnu, case N_Loop_Statement, case N_Exit_Statement): Change the way that EXIT_STMT finds the loop label. (gnat_gimplify_stmt, case LOOP_STMT, EXIT_STMT): Likewise. (gnat_gimplify_stmt, case DECL_STMT): Handle variable-sized decls here. (add_stmt): Use annotate_with_locus insted of setting directly. (pos_to_construct): Set TREE_PURPOSE of each entry to index. (gnat_stabilize_reference, case ARRAY_RANGE_REF): Merge with ARRAY_REF. * utils.c (gnat_install_builtins): Install __builtin_memcmp. (build_vms_descriptor): Add extra args to ARRAY_REF. (convert): Use VIEW_CONVERT_EXPR between aggregate types. * utils2.c (gnat_truthvalue_conversion, case INTEGER_CST, REAL_CST): New cases. (build_binary_op): Don't make explicit CONVERT_EXPR. Add extra rgs to ARRAY_REF. From-SVN: r83103
Diffstat (limited to 'gcc/ada/decl.c')
-rw-r--r--gcc/ada/decl.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/ada/decl.c b/gcc/ada/decl.c
index 41d405a..3f5d809 100644
--- a/gcc/ada/decl.c
+++ b/gcc/ada/decl.c
@@ -299,12 +299,15 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
/* For cases when we are not defining (i.e., we are referencing from
another compilation unit) Public entities, show we are at global level
- for the purpose of computing sizes. Don't do this for components or
+ for the purpose of computing scopes. Don't do this for components or
discriminants since the relevant test is whether or not the record is
- being defined. */
- if (! definition && Is_Public (gnat_entity)
- && ! Is_Statically_Allocated (gnat_entity)
- && kind != E_Discriminant && kind != E_Component)
+ being defined. But do this for Imported functions or procedures in
+ all cases. */
+ if ((! definition && Is_Public (gnat_entity)
+ && ! Is_Statically_Allocated (gnat_entity)
+ && kind != E_Discriminant && kind != E_Component)
+ || (Is_Imported (gnat_entity)
+ && (kind == E_Function || kind == E_Procedure)))
force_global++, this_global = 1;
/* Handle any attributes. */