It's undefined behaviour.
[statement.decl]/4
If control re-enters the declaration recursively while the variable is being initialized, the behavior is undefined. [Example:
int foo(int i) { static int s = foo(2*i); // recursive call - undefined return i+1; }
— end example ]