Цитата(MALLOY2 @ Jan 27 2010, 15:39)

PORTC должен быть объявлен как volatile, иначе получите оптимизацию по полной
В заголовочных файлах дивайсов в IAR порты уже объявлены volatile.
Цитата
The __io (__ext_io) memory attribute implies that objects are __no_init and volatile, and allows
objects to be accessed by use of the special I/O instructions in the AVR microcontroller.