diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-14 14:38:00 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-14 14:38:00 +0000 |
commit | 696fd0a123af4d2c19d19e197d0458c8065c5c9d (patch) | |
tree | 7c1c6d007fb7edb2bf1bc6d24d8a2e8d2c8f71fa /gcc/ada/gcc-interface | |
parent | fb26741a1eca8dbeaacf1972b9c0ff1220b42c16 (diff) | |
download | gcc-696fd0a123af4d2c19d19e197d0458c8065c5c9d.tar.gz |
Complete previous change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203567 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 1d7808bbdab..9ed804e420f 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -4894,6 +4894,19 @@ Exception_Handler_to_gnu_zcx (Node_Id gnat_node) add_stmt_with_node (build_call_n_expr (begin_handler_decl, 1, gnu_incoming_exc_ptr), gnat_node); + + /* Declare and initialize the choice parameter, if present. */ + if (Present (Choice_Parameter (gnat_node))) + { + tree gnu_param = gnat_to_gnu_entity + (Choice_Parameter (gnat_node), NULL_TREE, 1); + + add_stmt (build_call_n_expr + (set_exception_parameter_decl, 2, + build_unary_op (ADDR_EXPR, NULL_TREE, gnu_param), + gnu_incoming_exc_ptr)); + } + /* We don't have an End_Label at hand to set the location of the cleanup actions, so we use that of the exception handler itself instead. */ add_cleanup (build_call_n_expr (end_handler_decl, 1, gnu_incoming_exc_ptr), |