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

--- Comment #1 from Michael Meissner <meissner at gcc dot gnu.org> ---
The problem is the tests use initialization (both static and auto
initialization).  Unfortunately, when initializing a vector, the -maltivec=be
option is not checked when laying out the structure in memory.

Consider the following case:
vector int va = { 100, 200, 300, 400 };

This is laid out in memory for big endian, normal little endian, and little
endian with BE semantics as:
        .long 100
        .long 200
        .long 300
        .long 400

Because the vector is byte swapped when loaded on a LE system, and then the
index is swapped for normal -maltivec=LE but not for -maltivec=BE, vec_extract
will deliver the wrong element for vectors that are initialized.

Reply via email to