This is the mail archive of the gcc-patches@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]

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);
}



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