2013-02-24 12:08 AM
I have one strange problem. After this fragment of code program:
b = a;a =/ 40;if(!a)//breakpointsthe results of two registers are: b = 50000 - good value,a=0
The value of a should be about 1250 not 0!!I can't find place in my program where i change value of a, because I use it only in one place. Any suggestion how can I find solutions of this problem? #incorrect-expectations #wrong-value-register-bug #optimisation2013-02-25 01:07 AM
You have not given enough information.
Post the smallest complete program which illustrates your problem...2013-02-26 12:03 AM
most likely something has been optimized away: first step is to declare the variables as volatile and see if you get the expected value.
2013-02-26 10:46 AM
''declare the variables as volatile and see if you get the expected value''
If you do, that may well be an indication that the expectation was flawed...
2013-03-04 08:16 AM
Did you mean: a /= 40;
i.e., a = a/40; instead of a =/40? a =/ 40; if accepted by compiler will always set a to 0.