dynamic_cast metatroubles

dynamic_cast metatroubles


It appears that this report is, in fact, essentially ignored by Intel staff. Now, this is not exactly a priority issue (and I understand there are better places for this if it was), but still: am I missing something?

Let me try again: this code crashes when compiled with various combinations of ICC 12.1.5/13.0/13.1 + MSVC 2008/2012, with an std::__non_rtti_object exception showing up when debugged:

class A { public: virtual void _dummy() { } }; class B: virtual public A { }; class C: virtual public A, public B { }; int main() { auto c = new C; auto a = dynamic_cast< A * >( c ); auto b = dynamic_cast< B * >( c ); auto ca = dynamic_cast< C * >( a ); // ok auto cb = dynamic_cast< C * >( b ); // std::__non_rtti_object return 0; }


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Vladimir,

I updated the other thread with this as well, but I did reproduce this exception throw now, and I've submitted a problem report to our front-end team here.  When there's a status update, I'll update both threads.

Hi Vladimir,

The original issue with a std::__non_rtti_object exception getting thrown is resolved in the latest 13.1 and 14.0 compilers (Intel(R) C++ Composer XE 2013 and 2013 SP1 products). Let me know if you have any further issues.

Leave a Comment

Please sign in to add a comment. Not a member? Join today