summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/vmx/3c-02.c
blob: 1d105dde407811bc13399e615b2f8b55456bacd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "harness.h"

vector unsigned char u8;

static void f(void *p)
{
  u8 = vec_ld(1, (unsigned char *)p);
}

static void test()
{
  static vector unsigned int value = {1,-2,3,-4};
  static vector unsigned int buffer[2];
  buffer[1] = value;
  f((void *)(-1+(char*)(buffer+1)));
  check(vec_all_eq((vector unsigned int) u8, value), "u8");
}