internal error: 0_1204 when openmp used with try-catch


Reference Number : Q625172


Version : 12.0 update 1 & 2


Product : Intel® C++ Compiler XE 12.0 update 1 & 2


Operating System : Windows*


Problem Description : 
The below code was reduced from a big customer project, that uses Qt. The bug is in Intel compiler,
when openmp pragma/option is used, and exception-handling is used in a particular manner, though not in other cases. The workaround is to use /Od , instead of /O2. Or, do not use openmp pragma. Also, enable /EHsc since C++ exception handling mechanism is used.

Command-line for the bug:--
icl /c /Qopenmp /EHsc qterror.cpp

compile Error :-- internal error: 0_1204

Sometimes, during parallel compilation (using /MP), when such compile errors are generated, the below error message also comes in the output.
icl: error #10298: problem during post processing of parallel object compilation

Below sample code generates the error:--

#include <iostream>
using namespace std;
#include <vector>

class myclass{};
vector<myclass>					myvec;
template <typename T>
const T &mymin(const T &a, const T &b) { if (a < b) return a; return b; }
void func(const char* ch, const char* FILE, int LINE)
{
	cout << ch << " in file: " << __FILE__ << " in line: " << __LINE__ << "n";
	return;
}
bool Do()
	{
		myclass *j=&myvec[100];
		int lines = mymin(10,100);

		if(!lines)
		{
			{
			#pragma omp parallel for //num_threads(komp_num_threads) schedule(guided)
			for (int y = 0; y <= 100; y++)
			{
			try {
			func( "Openmp error",__FILE__, __LINE__ );		
				
			}catch(std::exception e) { };
			}
		}
		}
		
		return 1;
}


Resolution Status : This bug has been resolved in Intel Composer 12.0 XE update 3 , 4



[DISCLAIMER: The information on this web site is intended for hardware system manufacturers and software developers. Intel does not warrant the accuracy, completeness or utility of any information on this site. Intel may make changes to the information or the site at any time without notice. Intel makes no commitment to update the information at this site. ALL INFORMATION PROVIDED ON THIS WEBSITE IS PROVIDED "as is" without any express, implied, or statutory warranty of any kind including but not limited to warranties of merchantability, non-infringement of intellectual property, or fitness for any particular purpose. Independent companies manufacture the third-party products that are mentioned on this site. Intel is not responsible for the quality or performance of third-party products and makes no representation or warranty regarding such products. The third-party supplier remains solely responsible for the design, manufacture, sale and functionality of its products. Intel and the Intel logo are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. *Other names and brands may be claimed as the property of others.]
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.