diff options
Diffstat (limited to 'gcc/ada/trans.c')
-rw-r--r-- | gcc/ada/trans.c | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index 449f0f7..df6ab75 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -181,6 +181,7 @@ static enum tree_code gnu_codes[Number_Node_Kinds]; /* Current node being treated, in case abort called. */ Node_Id error_gnat_node; +static void init_code_table (void); static void Compilation_Unit_to_gnu (Node_Id); static void record_code_position (Node_Id); static void insert_code_for (Node_Id); @@ -269,6 +270,8 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, } #endif + /* Initialize ourselves. */ + init_code_table (); init_gnat_to_gnu (); gnat_compute_largest_alignment (); init_dummy_type (); @@ -281,6 +284,20 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, TYPE_SIZE_UNIT (void_type_node) = size_zero_node; } + /* Enable GNAT stack checking method if needed */ + if (!Stack_Check_Probes_On_Target) + set_stack_check_libfunc (gen_rtx_SYMBOL_REF (Pmode, "_gnat_stack_check")); + + /* Give names and make TYPE_DECLs for common types. */ + create_type_decl (get_identifier (SIZE_TYPE), sizetype, + NULL, false, true, Empty); + create_type_decl (get_identifier ("integer"), integer_type_node, + NULL, false, true, Empty); + create_type_decl (get_identifier ("unsigned char"), char_type_node, + NULL, false, true, Empty); + create_type_decl (get_identifier ("long integer"), long_integer_type_node, + NULL, false, true, Empty); + /* Save the type we made for integer as the type for Standard.Integer. Then make the rest of the standard types. Note that some of these may be subtypes. */ @@ -313,6 +330,7 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, gnat_init_gcc_eh (); gcc_assert (Nkind (gnat_root) == N_Compilation_Unit); + start_stmt_group (); Compilation_Unit_to_gnu (gnat_root); /* Now see if we have any elaboration procedures to deal with. */ @@ -361,20 +379,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, error_gnat_node = Empty; } -/* Perform initializations for this module. */ - -void -gnat_init_stmt_group (void) -{ - /* Initialize ourselves. */ - init_code_table (); - start_stmt_group (); - - /* Enable GNAT stack checking method if needed */ - if (!Stack_Check_Probes_On_Target) - set_stack_check_libfunc (gen_rtx_SYMBOL_REF (Pmode, "_gnat_stack_check")); -} - /* Returns a positive value if GNAT_NODE requires an lvalue for an operand of OPERAND_TYPE, whose aliasing is specified by ALIASED, zero otherwise. This is int instead of bool to facilitate usage @@ -6763,7 +6767,7 @@ post_error_ne_tree_2 (const char *msg, /* Initialize the table that maps GNAT codes to GCC codes for simple binary and unary operations. */ -void +static void init_code_table (void) { gnu_codes[N_And_Then] = TRUTH_ANDIF_EXPR; |