diff options
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index b4e193c..519dfb1 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10789,13 +10789,11 @@ ada_evaluate_subexp (struct type *expect_type, struct expression *exp, case TYPE_CODE_FUNC: if (noside == EVAL_AVOID_SIDE_EFFECTS) { - struct type *rtype = TYPE_TARGET_TYPE (type); - - if (TYPE_GNU_IFUNC (type)) - return allocate_value (TYPE_TARGET_TYPE (rtype)); - return allocate_value (rtype); + if (TYPE_TARGET_TYPE (type) == NULL) + error_call_unknown_return_type (NULL); + return allocate_value (TYPE_TARGET_TYPE (type)); } - return call_function_by_hand (argvec[0], nargs, argvec + 1); + return call_function_by_hand (argvec[0], NULL, nargs, argvec + 1); case TYPE_CODE_INTERNAL_FUNCTION: if (noside == EVAL_AVOID_SIDE_EFFECTS) /* We don't know anything about what the internal |