This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
More altivec array initialisation troubles
- From: Daniel Egger <degger at fhm dot edu>
- To: GCC Developer Mailinglist <gcc at gcc dot gnu dot org>
- Cc: Aldy Hernandez <aldyh at redhat dot com>
- Date: 22 Feb 2002 17:57:01 +0100
- Subject: 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