SDCC : pic16/pic14 3.0.2 #6382 (Mar 31 2011) (Linux)
I attached a little example, where I faced a strange behaviour. My original project divided more parts, so my variable got initial value in an other part and not in the main function. That cause problem in my program which is visible in the example.
I made a union to make easier way to manipulate bits which are flags. If I want to clear all flags, I simple clear the common byte by put zero into it. The compiled code is very different If I give initial value to the common byte or not giving any. If I give initial value the result is equal with that I expected. If I don't give any initial value before the "if( )" statment, I got only a "bit clear" mnemonic in the compiled code instead of a "clear file". I don't understand, why I got this difference.
This is a test file with comment to show the problematic part.
I found an option which could eliminate this problem.
--nogcse