Arduino 1.8.x: Problem with local declared variables in functions/methods


I've a general problem using Arduino with Teensy 3.6:
When I declare some variables local to a function or to a method aka

uint16_t   x, y;

and call this function in "loop()" several times, the code hangs.
When I change this line to

static uint16_t  x, y;

the code works without any problems.

Has anyone had the same experience?

Thanks in advance,

Please post a minimal demonstration sketch we can use to reproduce the problem.

Sorry to answer so late, but I don't receive any notification, if anyone answers to my posts!

If I describe the problem as a general bug, you can reproduce it with any sketch (with Teensy 3.6)!
I think, it is a bug in the stack maintainance.
You know, the memory for local variables is reserved on the stack, while the memory for static variables is reserved in the data area, where global variables are located.

It is not a general problem with using local variables - everyone uses local variables and nobody else has problems like that with it.

So you need to post a sketch which reproduces this in order for anyone else to analyze your claimed problem.