diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-07-03 09:06:08 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2012-07-03 09:06:08 +0000 |
commit | b83053bf4288fa0fe49eb55027174f9bc4600c43 (patch) | |
tree | d28a2bb0690595e7ac949c57f5831fc94694588a /gcc/ada/gcc-interface/trans.c | |
parent | 4a147e4e048576fd75cec40797cca5a972c91c48 (diff) | |
download | gcc-b83053bf4288fa0fe49eb55027174f9bc4600c43.zip gcc-b83053bf4288fa0fe49eb55027174f9bc4600c43.tar.gz gcc-b83053bf4288fa0fe49eb55027174f9bc4600c43.tar.bz2 |
trans.c (Call_to_gnu): Robustify test for function case if the CICO mechanism is used.
* gcc-interface/trans.c (Call_to_gnu): Robustify test for function case
if the CICO mechanism is used.
From-SVN: r189204
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index de03cba..08a263a 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -4084,7 +4084,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target, /* The first entry is for the actual return value if this is a function, so skip it. */ - if (TREE_VALUE (gnu_cico_list) == void_type_node) + if (function_call) gnu_cico_list = TREE_CHAIN (gnu_cico_list); if (Nkind (Name (gnat_node)) == N_Explicit_Dereference) @@ -4188,8 +4188,7 @@ Call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target, return value from it and update the return type. */ if (TYPE_CI_CO_LIST (gnu_subprog_type)) { - tree gnu_elmt = value_member (void_type_node, - TYPE_CI_CO_LIST (gnu_subprog_type)); + tree gnu_elmt = TYPE_CI_CO_LIST (gnu_subprog_type); gnu_call = build_component_ref (gnu_call, NULL_TREE, TREE_PURPOSE (gnu_elmt), false); gnu_result_type = TREE_TYPE (gnu_call); |