This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [Patch] Unnamed vector args passing for ppc linux 32 bit
- From: "Hartmut Penner" <HPENNER at de dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: geoffk at apple dot com, aldyh at redhat dot com, "David Edelsohn" <edelsohn at us dot ibm dot com>
- Date: Thu, 18 Dec 2003 10:12:06 +0100
- Subject: RE: [Patch] Unnamed vector args passing for ppc linux 32 bit
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);
}