This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Avoid using Keil 4.13a - it generates defective code

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.

Parents
  • This has been my original report to Keil Intl before I have found that this issue affect also
    regular function call. I do not know what triggers this issue.

    --------------------------------------------------------------------------
    Please look at this image: www.penguin.cz/.../CtorFailure.gif

    Dear Keil support,

    I am facing a problem that automatic variables are not initialised properly - see attached image

    I have debugged a code and ctor is called in both cases. But for a variable on stack it does
    not initialise object properly.

    class string {
    private:  static char Dummy;
              char *ch;
              unsigned int maxlen;
              unsigned int size;
    
              void resize(unsigned int NewMaxlen);
    public:   explicit string(unsigned len);        //explicit is expanded to private: for obsolette
    compilers
    
    public:   string(void)                          {size=maxlen=0;ch=0;};
    


    ...................................................................

Reply
  • This has been my original report to Keil Intl before I have found that this issue affect also
    regular function call. I do not know what triggers this issue.

    --------------------------------------------------------------------------
    Please look at this image: www.penguin.cz/.../CtorFailure.gif

    Dear Keil support,

    I am facing a problem that automatic variables are not initialised properly - see attached image

    I have debugged a code and ctor is called in both cases. But for a variable on stack it does
    not initialise object properly.

    class string {
    private:  static char Dummy;
              char *ch;
              unsigned int maxlen;
              unsigned int size;
    
              void resize(unsigned int NewMaxlen);
    public:   explicit string(unsigned len);        //explicit is expanded to private: for obsolette
    compilers
    
    public:   string(void)                          {size=maxlen=0;ch=0;};
    


    ...................................................................

Children
No data