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

Internal error during compilation variadic template

creatorcray
Beginner
428 Views
Source:
[cpp]template class LoggerBaseTest { public: template void WriteEx (long level, const wchar_t* mask, Args... args); private: __int64 m_prevTSC; }; template template void LoggerBaseTest::WriteEx (long level, const wchar_t* mask, Args... args) { if (Config & 1) { if (Config & 2) m_prevTSC = _rdtsc (); // using _rdtsc () triggers the bug. } } int main () { class foo {}; LoggerBaseTest s_logger; s_logger.WriteEx (1, L"%s %u", L"123", 1234); }[/cpp]
Compiler output:
[cpp]Compiling with Intel C++ Compiler XE 12.1.2.278 [IA-32]... (Intel C++ Environment) main2.cpp (0): internal error: backend signals icl: error #10298: problem during post processing of parallel object compilation Build Time: 0:00:00 Test3 - 2 error(s), 0 warning(s), 0 remark(s) [/cpp] Using MSVC 2008 on Windows
0 Kudos
1 Solution
Georg_Z_Intel
Employee
428 Views
Hello,

I'm surprised by this as well. Boiling down your example to
[bash]class X { template void foo(); }; template void X::foo() { _rdtsc(); }[/bash]
shows the same problem. I've filed a defect ticket for it (DPD200276936).

As solution I've included "immintrin.h" which defines the "_rdtsc()" intrinsic. Does this solution also work for you?

I'm sorry that you seem to have quite some problems with our compiler using variadic template arguments. The more we appreciate your feedback to improve our compiler!

Thank you & best regards,

Georg Zitzlsberger

View solution in original post

0 Kudos
3 Replies
Georg_Z_Intel
Employee
429 Views
Hello,

I'm surprised by this as well. Boiling down your example to
[bash]class X { template void foo(); }; template void X::foo() { _rdtsc(); }[/bash]
shows the same problem. I've filed a defect ticket for it (DPD200276936).

As solution I've included "immintrin.h" which defines the "_rdtsc()" intrinsic. Does this solution also work for you?

I'm sorry that you seem to have quite some problems with our compiler using variadic template arguments. The more we appreciate your feedback to improve our compiler!

Thank you & best regards,

Georg Zitzlsberger
0 Kudos
creatorcray
Beginner
428 Views
Yes, #include fixes this issue. Thank you.

I make few more tests and figured out that any intrinsic, used without including the proper header, will trigger this issue.
0 Kudos
Georg_Z_Intel
Employee
428 Views
Hello,

this problem will be fixed in Intel Composer XE 2011 Update 10. It will be available in the near future.

Thank you again for reporting & best regards,

Georg Zitzlsberger
0 Kudos
Reply