diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-23 10:58:32 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-23 10:58:32 +0000 |
commit | 4a3f445c3e5d160eb37014413b8966a69c95338f (patch) | |
tree | e728ebf633a8731c1d1be7b76b75c3f146f0eb8e /gcc/ada/trans.c | |
parent | 44217381d4b2e8d2e0985f06b929069da12aabf9 (diff) | |
download | gcc-4a3f445c3e5d160eb37014413b8966a69c95338f.tar.gz |
2004-04-23 Emmanuel Briot <briot@act-europe.fr>
* adaint.c (__gnat_try_lock): No longer requires that the parent
directory be writable, the directory itself is enough.
(gnat_is_absolute_path): Change profile, so that the call from
GNAT.OS_Lib can be made more efficient.
* adaint.h (gnat_is_absolute_path): Change profile, so that the call
from GNAT.OS_Lib can be made more efficient.
* g-os_lib.adb (Is_Absolute_Path): More efficient implementation, avoid
one copy of the file name. Found by code reading.
2004-04-23 Vincent Celier <celier@gnat.com>
* gnat_ugn.texi: Add documentation for gnatmake switch -eL
Correct documentation on gnatmake switches transmitted to the compiler
* ali.ads: Minor comment fix
2004-04-23 Javier Miranda <miranda@gnat.com>
* sem_ch6.adb: (Confirming Types): Code cleanup
* decl.c (gnat_to_gnu_entity): Give support to anonymous access to
subprogram types: E_Anonymous_Access_Subprogram_Type and
E_Anonymous_Access_Protected_Subprogram_Type.
2004-04-23 Thomas Quinot <quinot@act-europe.fr>
* sem_dist.adb: Add a new paramter to the RAS_Access TSS indicating
whether a pragma All_Calls_Remote applies to the subprogram on which
'Access is taken.
No functional change is introduced by this revision; the new parameter
will be used to allow calls to local RCI subprograms to be optimized
to not use the PCS in the case where no pragma All_Calls_Remote applies,
as is already done in the PolyORB implementation of the DSA.
* exp_dist.adb: Add a new paramter to the RAS_Access TSS indicating
whether a pragma All_Calls_Remote applies to the subprogram on which
'Access is taken.
No functional change is introduced by this revision; the new parameter
will be used to allow calls to local RCI subprograms to be optimized
to not use the PCS in the case where no pragma All_Calls_Remote applies,
as is already done in the PolyORB implementation of the DSA.
2004-04-23 Robert Dewar <dewar@gnat.com>
* Makefile.rtl: Add entry for s-addope.o in run time library list
* Make-lang.in: Add entry for s-addope.o to GNAT1 objects
* s-addope.ads, s-addope.adb: New files.
* s-carsi8.adb, s-carun8.adb, s-casi16.adb, s-casi32.adb,
s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
s-finimp.adb, s-geveop.adb, s-stoele.adb: Modifications to allow
System.Address to be non-private and signed.
* sem_elim.adb: Minor reformatting (fairly extensive)
Some minor code reorganization from code reading
Add a couple of ??? comments
2004-04-23 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* trans.c (tree_transform, build_unit_elab): Don't call getdecls.
(tree_transform, case N_If_Statement): Remove non-determinism.
* utils.c (begin_subprog_body): Just set DECL_CONTEXT in PARM_DECL.
2004-04-23 Sergey Rybin <rybin@act-europe.fr>
* gnat_rm.texi: Small fixes in the changes made in the 'pragma
Eliminate' section.
* snames.ads, snames.adb: Remove Name_Homonym_Number (Homonym_Number is
no longer used as a parameter name for Eliminate pragma).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81086 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/trans.c')
-rw-r--r-- | gcc/ada/trans.c | 62 |
1 files changed, 28 insertions, 34 deletions
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index 8b485455949..9c2534e89e7 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -2107,37 +2107,31 @@ tree_transform (Node_Id gnat_node) case N_If_Statement: gnu_result = NULL_TREE; - /* Make an IF_STMT for each of the "else if" parts. */ + /* Make an IF_STMT for each of the "else if" parts. Avoid + non-determinism. */ if (Present (Elsif_Parts (gnat_node))) for (gnat_temp = First (Elsif_Parts (gnat_node)); Present (gnat_temp); gnat_temp = Next (gnat_temp)) { - tree gnu_cond, gnu_elseif; - - gnu_cond = gnat_to_gnu (Condition (gnat_temp)); - gnu_elseif - = build_nt (IF_STMT, gnu_cond, - build_block_stmt (Then_Statements (gnat_temp)), - NULL_TREE, NULL_TREE); - - TREE_SLOC (gnu_elseif) = Sloc (Condition (gnat_temp)); - TREE_CHAIN (gnu_elseif) = gnu_result; - TREE_TYPE (gnu_elseif) = void_type_node; - gnu_result = gnu_elseif; + gnu_expr = make_node (IF_STMT); + + IF_STMT_COND (gnu_expr) = gnat_to_gnu (Condition (gnat_temp)); + IF_STMT_TRUE (gnu_expr) + = build_block_stmt (Then_Statements (gnat_temp)); + IF_STMT_ELSE (gnu_expr) = IF_STMT_ELSEIF (gnu_expr) = NULL_TREE; + TREE_SLOC (gnu_expr) = Sloc (Condition (gnat_temp)); + TREE_CHAIN (gnu_expr) = gnu_result; + TREE_TYPE (gnu_expr) = void_type_node; + gnu_result = gnu_expr; } - { - tree gnu_cond, then_block, else_block; - - gnu_cond = gnat_to_gnu (Condition (gnat_node)); - then_block = build_block_stmt (Then_Statements (gnat_node)); - else_block = build_block_stmt (Else_Statements (gnat_node)); - - gnu_result = build_nt (IF_STMT, gnu_cond, - then_block, - nreverse (gnu_result), - else_block); - } + /* Now make the IF_STMT. Also avoid non-determinism. */ + gnu_expr = make_node (IF_STMT); + IF_STMT_COND (gnu_expr) = gnat_to_gnu (Condition (gnat_node)); + IF_STMT_TRUE (gnu_expr) = build_block_stmt (Then_Statements (gnat_node)); + IF_STMT_ELSEIF (gnu_expr) = nreverse (gnu_result); + IF_STMT_ELSE (gnu_expr) = build_block_stmt (Else_Statements (gnat_node)); + gnu_result = gnu_expr; break; case N_Case_Statement: @@ -2264,7 +2258,7 @@ tree_transform (Node_Id gnat_node) /* Communicate to GCC that we are done with the current WHEN, i.e. insert a "break" statement. */ expand_exit_something (); - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); } @@ -2403,7 +2397,7 @@ tree_transform (Node_Id gnat_node) gnat_statement = Next (gnat_statement)) gnat_to_code (gnat_statement); - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); gnu_block_stack = TREE_CHAIN (gnu_block_stack); @@ -2429,7 +2423,7 @@ tree_transform (Node_Id gnat_node) /* Close the nesting level that sourround the loop that was used to declare the loop index variable. */ set_lineno (gnat_node, 1); - expand_end_bindings (getdecls (), 1, -1); + expand_end_bindings (NULL_TREE, 1, -1); poplevel (1, 1, 0); } @@ -2447,7 +2441,7 @@ tree_transform (Node_Id gnat_node) expand_start_bindings (0); process_decls (Declarations (gnat_node), Empty, Empty, 1, 1); gnat_to_code (Handled_Statement_Sequence (gnat_node)); - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); gnu_block_stack = TREE_CHAIN (gnu_block_stack); if (Present (Identifier (gnat_node))) @@ -2733,7 +2727,7 @@ tree_transform (Node_Id gnat_node) will be present and any OUT parameters will be handled there. */ gnat_to_code (Handled_Statement_Sequence (gnat_node)); - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); gnu_block_stack = TREE_CHAIN (gnu_block_stack); @@ -3539,7 +3533,7 @@ tree_transform (Node_Id gnat_node) gnu_except_ptr_stack = TREE_CHAIN (gnu_except_ptr_stack); /* End the binding level dedicated to the exception handlers. */ - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); /* End the "if" on setjmp. Note that we have arranged things so @@ -3602,7 +3596,7 @@ tree_transform (Node_Id gnat_node) /* Close the binding level we made, if any. */ if (exitable_binding_for_block) { - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); } } @@ -3810,7 +3804,7 @@ tree_transform (Node_Id gnat_node) if (Exception_Mechanism == GCC_ZCX) { /* Tell the back end that we're done with the current handler. */ - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); expand_end_catch (); @@ -5542,7 +5536,7 @@ build_unit_elab (Entity_Id gnat_unit, int body_p, tree gnu_elab_list) break; } - expand_end_bindings (getdecls (), kept_level_p (), -1); + expand_end_bindings (NULL_TREE, kept_level_p (), -1); poplevel (kept_level_p (), 1, 0); gnu_block_stack = TREE_CHAIN (gnu_block_stack); end_subprog_body (); |