Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7954 Discussions

"assertion failed: dump_type_declaration: bad type kind" in ICL

Eugene_S_1
Beginner
495 Views

Hello.

The following simple code compiles and runs fine.

template<class D>
struct CRTP
{
	const D& Derived() const { return static_cast<const D&>(*this); }

	auto get() const { return Derived().get(); }
};

struct C : CRTP<C>
{
	int get() const { return 123; }
};

template<class T>
void func(const CRTP<T>& x)
{
	std::cout << x.get() << '\n';
}

int main()
{
	C c;
	func(c);
}

But if I comment the call func(c) at the line 23, compilation fails with the following error:

assertion failed: dump_type_declaration: bad type kind (shared/cfe/edgglue/edg_type.c, line 433)

The compiler is: Intel(R) C++ Compiler XE for applications running on IA-32, Version 15.0.7.287 Build 20160518

0 Kudos
5 Replies
Yuan_C_Intel
Employee
495 Views

Hi, Eugene

Thank you for reporting the issue.

What's your platform? Is it for Linux or Windows or OSX?

Thanks.

0 Kudos
Eugene_S_1
Beginner
495 Views

Hello,

Thanks for the reply.

Yuan C. (Intel) wrote:
What's your platform? Is it for Linux or Windows or OSX?

It's Windows.

0 Kudos
Melanie_B_Intel
Employee
495 Views

I wasn't able to reproduce the problem, but I am using a development version of the compiler. Would you kindly post the preprocessed file along with the icl command line that you are using (to generate preprocessed file, add -E command line option on the icl command line and redirect standard output to a text file, then attach to the forum post)?  Incidentally, you are using an older version of the compiler.  A newer version of the compiler (16.0) is available.  Be sure to #include iostream since the program calls cout.

Thanks! --Melanie

0 Kudos
Eugene_S_1
Beginner
495 Views

Dear Melanie,

I've updated my compiler and can confirm that with the 16.0 version the problem is gone (and if I switch back to 15.0 it is there). If you still need the preprocessed file, please let me know.

0 Kudos
Melanie_B_Intel
Employee
495 Views

As far as I know we aren't shipping updates to 15.0; I hope you are able to use the 16.0 compiler.  Thanks for the info.

0 Kudos
Reply