[Bug tree-optimization/78681] [7 Regressions] ICE in determine_value_range, at tree-ssa-loop-niter.c:413
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 5 14:57:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78681
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
We shouldn't ICE on this, but otherwise, garbage in, garbage out. The
prototype doesn't match the K&R definition.
Slightly cleaned up testcase:
struct S { char b; };
char d, e, f, l, m;
struct S n;
int bar (char, char);
static void foo (struct S *, int, int, int, int);
static void
foo (x, g, h, i, j)
struct S *x;
char g, h, i, j;
{
char k;
for (k = 0; k <= j; k++)
if (bar (g, k))
for (; i; k++)
if (d)
x->b = g;
}
void
baz (int q)
{
foo (&n, m, l, f, 1);
foo (&n, m, e, f, e - 1);
}
It is enough if just one argument disagrees (e.g. the int vs. char on just j,
not all the others).
More information about the Gcc-bugs
mailing list