summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr34856.c
blob: 6bfc704774f0b3982179cc1a6b275243c6a3c316 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -msse2" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-options "-O2 -maltivec" { target { powerpc*-*-linux* && powerpc_altivec_ok } } } */

typedef unsigned __attribute__ ((__mode__ (__pointer__))) uintptr_t;

#undef __vector
#define __vector __attribute__ ((__vector_size__ (16)))

typedef __vector signed char qword;
typedef __vector uintptr_t VU;

extern short g[192 + 16];

void f (qword);

void f1 (unsigned ctr)
{
  VU pin;

  pin = (VU){(uintptr_t) &g[16]};
  do
    {
      f ((qword) pin);
      ctr--;
    }
  while (ctr);
}

/* Ignore a warning that is irrelevant to the purpose of this test.  */
/* { dg-prune-output ".*GCC vector passed by reference.*" } */