The example shown below reproduces the problem. This was compiled in a brand new C++ project with no other user code involved. Sample project attached to this post for reference.
Here are two changes that will prevent the error (but not solve the problem):
- make the ~Entity() destructor non-virtual
- do not use virtual inheritance for Object and Interface
Here is a work-around:
- delete '(Entity*)ptr' instead of 'ptr'
#include <hidef.h>#include "derivative.h"class Entity{ public: virtual ~Entity() { }};class Object : public virtual Entity { /*...*/ };class Interface : public virtual Entity { /*...*/ };class MyClass : public Object, public Interface{ public: virtual ~MyClass() { }};void main(void){ MyClass* ptr = new MyClass; delete ptr; // Error : C5701: Internal Error #604 in 'f:\build\Products\Hiware\cw_hc12_Build_Tools\hiware\src\ccpp\ccpp.cpp' // while compiling file 'C:\dev\projects\spike\test_project\Sources\main.cpp', procedure 'main', please report to Freescale EnableInterrupts; for(;;) { _FEED_COP(); }}
You need to file an on-line service request to report this problem. Click here to do that. You will want to send them your code sample to help reproduce the error.
---Tom
Thanks, Tom. I have submitted a service request.
Is that the proper way to submit a bug report? I looked around on the website and could not find a definitive answer, but I did see several "Bug Report:" forum messages so I assumed that this was the proper way.
If you're having a problem, the first thing to do is ask here in the forums. There's a lot of knowledgeable people here who can help you out. Occasionally the problem will be so hard to deal with that it requires you file a service request.
Having said that, if the problem is a reproducible bug, the best course of action is to file a service request so that it gets the attention of the engineers. Some of them do patrol the forums, but by filing a service request you start a formal process to where the probem is recorded and does have to be looked into.
---Tom