I warn anybody before using ARM Keil 4.13a. It generates defective code. I have spent several hours with debugging a code that has been already worked. The problem affects local variables of functions and passing arguments. Code has been wrongly compiled without any optimization. I have no courage and time to test optimizations.
I also encourage Keil not to publish Keil 4.13a any more.
Keil 4.12 seems to be OK.
It must be at least as likely that the fault lies in your source code?
It is quite common that a change of compiler will bring out previously hidden faults in the source code that just happened not to manifest previously; ie, you were lucky with 4.12, but your luck has just run out with 4.13a.
Yes, I have reported this issue to Keil yesterday and no reply obtained yet.
I do not wish to bog down into details. In several cases compiler mis-compiled pointer to variable to a different location. In some cases C++ code called wrong ctor and so on... All these issues are not observable in 4.12.
Some construct like this passed completely different pointer. But this simple case would probably work fine. The real function had 4 parameters and some of them were passed correctly.
void proc1(void *p) { }
void proc2(void) { char c;
proc1(&c); }
I cannot attach image to this forum to demonstrate screenshot of Keil. I reverted back to 4.12 and any analysis would take me lot of time.
Have you got real hard evidence of your error? Have you given it to Keil? It only seems sensible and fair to provide as much detail as possible when making a claim about such matters.
I previously reported problems to Keil concerning 4.12 and inline optimisations. I included specific examples with full annotations of what I suspected were code generation errors.
Glad to say that they appear to be fixed in 4.13a. I, for one, will NOT be going back to 4.12.
View all questions in Keil forum