My previous post was quite long, wrong title, and didn't contain code which could be easily tested by others, so I try to be more precise this time.
Bug Description: status,z -flag is not updated when using if(var != 0) and maximal optimization (used as default optimization ?)
Steps to reproduce:
Copy the code below and build it with maximal optimization (Settings -> Options -> Optimization)
//bug.c
// this program turns on all PORTB pins, if everything works
void main()
{
char result = 0;
TRISB=0;
PORTB=0;
while(1)
{
result=1;
//asm movf _result_main,w;