https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109093
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps better reduction which doesn't need inline asm. It contains a couple
of unused variables and two spots with uninitialized vars, but those should be
both in a block of code never executed at runtime. And the various ptr vs.
integral casts are also needed but I think they shouldn't do much harm (it is
true in one spot it creates a pointer from int, but only stores it somewhere
and doesn't actually use later).
/* PR target/109093 */
/* { dg-do run { target avx_runtime } } */
/* { dg-options "-O3 -mavx -mtune=znver1 -fno-strict-aliasing
-ftrivial-auto-var-init=zero" } */
int a, b = 1, c, d, e, f, g, h, i, j, k, l, m;
int *n = &d, *o = &i, *p = &h;
static int q;
int *f2;
int **r = &f2, **s = &o;
char t;
int u[1];
int ***v;
static void
foo (int x)
{
int *w[7];
int y = y, i;
const int z[32] = { };
int aa = (__PTRDIFF_TYPE__) z;
for (i = 0; i < 7; i++)
w[i] = u;
lab:
*r = (int *) (__PTRDIFF_TYPE__) x;
if (k || p == 0)
{
int ab[1];
for (; g; g++)
{
int **ac[] = { w };
}
short ad[3];
if (j)
goto lab;
for (; y; y -= 1)
{
int *ae;
*ae = l;
for (; t; t += 1)
if (**r)
return;
for (; q; q += f)
;
}
}
}
static void
bar (int *x)
{
long w[] = { 1, 1, 4073709551607, 1, 1 };
if (*x + 6)
{
(void) ((**s |= a) > (__PTRDIFF_TYPE__) w);
foo (d);
}
for (e = 0; e <= 2; e += 1)
{
int *y[4];
r = (int **) x;
for (m = 0; m <= 2; m += 1)
for (b = 0; b <= 2; b += 1)
if (c)
{
q = 0;
***v = (__PTRDIFF_TYPE__) r;
}
}
}
int
main ()
{
if (b)
bar (n);
}