This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

More altivec array initialisation troubles


Hija, this one is particularly lovely:

static const vector signed short test4[4] =
{
    {1, 2, 3, 4, 5, 6, 7, 8},
    {11, 12, 13, 14, 15, 16, 17, 18},
    {21, 22, 23, 24, 25, 26, 27, 28},
    {31, 32, 33, 34, 35, 36, 37, 38}
};

will compile to:

test4:
        .short  1
        .short  2
        .short  3
        .short  4
        .zero   8
        .short  11
        .short  12
        .short  13
        .zero   10
        .short  21
        .short  22
        .zero   12
        .short  31
        .zero   14

In the first row the values after the 4th short are truncated and
filled with zero, in the second after the 3rd, in the third after
the 2nd and in the fourth after the 1st.

-- 
Servus,
       Daniel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]