Deep recursion with an accumulator parameter

Compiled with -O2, what happens when you call sumTo(1000000, 0)?

main.cpp
long sumTo(long n, long acc) {
    if (n == 0) return acc;
    return sumTo(n - 1, acc + n);  // recursive call is the entire return expression
}

15 of 44 in Compilers