Stop assuming no-debug-info functions return int
[deliverable/binutils-gdb.git] / gdb / ada-lang.c
index b4e193ca80214927237f7aeca8711e0abcba5eca..519dfb12924d12a25b3d2411ee04fa3f0ed17b62 100644 (file)
@@ -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
This page took 0.02791 seconds and 4 git commands to generate.