pgCC crash using OpenMP reduction clause

Hi!
I’m using pgCC 11.3-0 64-bit target on x86-64 Linux
Compiling the following code as:
pgCC -c -mp bug.cpp
crashes the compiler.
Commenting one of the two #pragma omp sections make the compilation succeed. Also the old pgCC version 8.06 does not crash.
Thanks for your help!
mario

double cr(void)
{
	double a = 0;
	double b = 0;
	#pragma omp parallel sections default(shared)
	{
		#pragma omp section
		{
			a += 1;
		}
		#pragma omp section
		{
			b += 1;
		}
	}

	// For all (valid) sites
	unsigned int num_sites = 100;
	double lnl = 0;

	#pragma omp parallel for reduction(+:lnl) default(shared)
	for(int site=0; site < (int)num_sites; ++site)
	{
		lnl += 1;
	}

	return lnl;
}

Just discovered that setting the environment variable MALLOC_CHECK_ to 0 before running pgCC avoids the crash.

Not happy, but at least I can continue my testing.
Ciao!
mario

Hi Mario,

Thanks for the report. I’ve been able to reproduce the error all the way back to the 9.0 release. Sent a report to engineering (TPR#17873) and hopefully they can fix it here shortly.

Best Regards,
Mat