From 966389eeaaf6b674bbfbdc34b06314c2dd7f8591 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Mon, 14 Jun 2004 14:09:38 +0000 Subject: 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 --- gcc/ada/decl.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'gcc/ada/decl.c') 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. */ -- cgit v1.1