[Bug c/92324] [10 Regression] ICE in expand_direct_optab_fn, at internal-fn.c:2890
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Nov 4 10:59:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92324
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Related, the following is miscompiled at -O3.
unsigned b[1024];
int __attribute__((noipa))
foo (int n)
{
int res = 0;
for (int i = 0; i < n; ++i)
{
res = res > b[i] ? res : b[i];
}
return res;
}
int main ()
{
b[3] = (unsigned)__INT_MAX__ + 1;
if (foo (4) != -__INT_MAX__ - 1)
__builtin_abort ();
return 0;
}
More information about the Gcc-bugs
mailing list