On Mon, Jun 8, 2020 at 11:59 PM Martin Sebor via Gcc-patches <gcc-patches@gcc.gnu.org> wrote: > > PR 95581 reports an ICE in a call to gimple_call_arg() with > an out-of-bounds argument number (2). The attached patch avoids > the ICE but I'm not sure it's the right fix. Other than verifying > the ICE is gone with a powerpc64 cross-compiler I couldn't come up > with a generic test cases to exercise this change. > > The call, synthesized by the vectorizer, is > > vect__5.6_24 = __builtin_altivec_mask_for_load (vectp_a.5_8); > > but the function is declared by the powerpc64 back end to take two > arguments: long and const void*. Is it correct for the builtin to > be called with fewer arguments than their type indicates? (If it > isn't the patch shouldn't be necessary but some other fix would > be needed.)
I think the backend declaration is wrong, the function only takes a void * argument and returns a long. Richard. > > Martin