[Patch] Unnamed vector args passing for ppc linux 32 bit
Hartmut Penner
HPENNER@de.ibm.com
Thu Dec 18 10:41:00 GMT 2003
Testcase for problem, fails on linux 32 bit, fixed with patch.
/* { dg-do run { target powerpc*-*-* } } */
/* { dg-options "-maltivec -mabi=altivec" } */
#include <altivec.h>
#include <stdarg.h>
void
f_ce (char *s, ...)
{
vector int v,w;
vector int v1 = {1, 2, 3, 4};
vector int w1 = {5, 6, 7, 8};
va_list arg;
va_start (arg, s);
v = va_arg(arg, vector int);
w = va_arg(arg, vector int);
if (!vec_all_eq (v1, v))
abort ();
if (!vec_all_eq (w1, w))
abort ();
}
int
main()
{
char *s = "vv";
vector int v = {1, 2, 3, 4};
vector int w = {5, 6, 7, 8};
f_ce (s, v, w);
}
More information about the Gcc-patches
mailing list