[PATCH, rs6000] Fix vector long long subtype (PR96139)
[platform/upstream/gcc.git] / gcc / testsuite / gcc.target / powerpc / pr96139-a.c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wall -m32" } */
3 /* { dg-require-effective-target ilp32 } */
4 /* { dg-require-effective-target powerpc_altivec_ok } */
5
6 #include <stdio.h>
7 #include <altivec.h>
8
9 void
10 try_printing_longlong_a (
11                         __vector signed char cval,
12                         __vector signed int ival,
13                         __vector signed long long int llval,
14                         int x, int y, int z)
15 {
16   printf (" %016llx \n", llval[x]);
17   printf (" %016x \n", ival[z]);
18   printf (" %c \n", cval[y]);
19 }
20
21 void
22 try_printing_unsigned_longlong_a (
23                         __vector unsigned char cval,
24                         __vector unsigned int ival,
25                         __vector unsigned long long int llval,
26                         int x, int y, int z)
27 {
28   printf (" %016llx \n", llval[x]);
29   printf (" %016x \n", ival[z]);
30   printf (" %c \n", cval[y]);
31 }
32