AVR-GCC for Linux doesn't handle well 16 bit words

Rule #1: All and every software in the world comes with bugs; deny them don't make them dissapear:

https://www.mikrocontroller.net/articles/Avr-gcc_Bugs

Look for the ones with higher numbers, they are the most recent.