aboutsummaryrefslogtreecommitdiff
path: root/tests/tcg/tricore/c/test_context_save_areas.c
blob: a300ee2f9cbff0fe7f8cf8f0e031c370c16eb3c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "testdev_assert.h"

static int fib(int n)
{
    if (n == 1 || n == 2) {
        return 1;
    }
    return fib(n - 2) + fib(n - 1);
}

int main(int argc, char **argv)
{
    testdev_assert(fib(10) == 55);
    return 0;
}