[Bug tree-optimization/83857] [8 Regression] internal compiler error: in exact_div, at poly-int.h:2139
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 15 18:26:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83857
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase with -Ofast:
template <int N> struct C {
typedef int D[N];
static int &foo (D x, int y) { return x[y]; }
};
template <typename, int N> struct A {
typedef C<N> H;
typename H::D k;
int &operator[](long x) { return H::foo (k, x); }
};
template <typename T> void bar (T);
float v;
int
main ()
{
constexpr int n = 1 << 8;
A<float, n> o;
auto load = [&](int i, float q) { o[i] = q;
for (int j = 1; j < 8; ++j)
o[i + j] = o[i + j - 1]; };
for (float p = v; p;)
for (auto j = 0; j < n; j += 8)
{
p += 4.e7f;
load (j, p);
}
bar (o);
}
More information about the Gcc-bugs
mailing list