Object counter « counting box »

The bug itself is in gcc, not Arduino, but it's a very specific interaction between your code, the Arduino IDE and the compiler itself that triggers it.

So when submitting the bug add as much detail of your system as possible, especially the IDE version, so they have a chance of reproducing it, and hopefully fixing the problem.