]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pr98793.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr98793.c
CommitLineData
4be156d6
RB
1/* { dg-do run } */
2/* { dg-options "-O2 -Wno-psabi" } */
3
4typedef unsigned char u8;
5typedef unsigned char __attribute__((__vector_size__ (8))) v64u8;
6typedef unsigned char __attribute__((__vector_size__ (64))) v512u8;
7typedef unsigned long long u64;
8
9u64 gx;
10v512u8 gu;
11v512u8 gv;
12
13v64u8 __attribute__((__noipa__)) foo0 (u8 ax, v512u8 au, u64 ay)
14{
15 u8 lx = ax && (u8) ay;
16 v512u8 lc = 7 <= au;
17 v512u8 ld = (u8) (ay && gx) == gu;
18 v512u8 le = (v512u8) ld + (v512u8) gv;
19 v512u8 lf = le + lc;
20 return (((union
21 {
22 v512u8 a;
23 v64u8 b[8];
24 }) lf).b[3]) + lx;
25}
26
27int
28main (void)
29{
30 v64u8 x = foo0 (2, (v512u8) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
31 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15
32 },
33 2);
34 for (unsigned i = 0; i < sizeof (x); i++)
35 if (x[i] != (i ? 0 : 0xff))
36 __builtin_abort ();
37 return 0;
38}