https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65624

--- Comment #4 from Maxim Ostapenko <chefmax at gcc dot gnu.org> ---
(In reply to ktkachov from comment #3)
> Actually, r218021 touches the argument expansion rather than builtin
> expansion functions, so I'm not sure that would fix it. But still, I can't
> reproduce this on current trunk with aarch64-none-linux-gnu

I'm sorry, but did you try to reproduce on i686 host? This is the only host I
can reproduce this on, for x86_64 everything is fine.

When aarch64_simd_expand_builtin fills args array for 4-argument intrinsic with
return value, it feels it with values like this:

1070      args[k] = SIMD_ARG_STOP;
(gdb) p args
$4 = {SIMD_ARG_COPY_TO_REG, SIMD_ARG_COPY_TO_REG, SIMD_ARG_COPY_TO_REG,
SIMD_ARG_COPY_TO_REG, SIMD_ARG_LANE_INDEX}
(gdb) p args[5]
$6 = SIMD_ARG_STOP

Note, that SIMD_ARG_STOP was written right after args array, since it's size is
5. Isn't it a UB here?

Reply via email to