[Bug c++/56694] [4.8/4.9 Regression] Internal compiler error when compiling OpenMP code
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 25 12:29:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56694
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> 2013-03-25 12:28:55 UTC ---
Reduced testcase:
class GException {
public:
class vector_mismatch {
public:
vector_mismatch(int size1, int size2);
};
};
class GVector{
public:
GVector& operator+=(const GVector& v);
int m_num;
double* m_data;
};
inline GVector& GVector::operator+= (const GVector& v)
{
if (m_num != v.m_num)
throw GException::vector_mismatch(m_num, v.m_num);
for (int i = 0; i < m_num; ++i) m_data[i] += v.m_data[i];
};
void eval(GVector* m_gradient, GVector* vect_cpy_grad, int n)
{
#pragma omp sections
{
for (int i = 0; i < n; ++i)
*m_gradient += vect_cpy_grad[i];
}
}
More information about the Gcc-bugs
mailing list