Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr85376.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* PR rtl-optimization/85376 */ | |
2 /* { dg-do run { target int128 } } */ | |
3 /* { dg-options "-Og -fno-dce -fgcse -fno-tree-ccp -fno-tree-copy-prop -Wno-psabi" } */ | |
4 | |
5 typedef unsigned int U __attribute__ ((vector_size (64))); | |
6 typedef unsigned __int128 V __attribute__ ((vector_size (64))); | |
7 unsigned int e, i, l; | |
8 unsigned char f; | |
9 U g, h, k, j; | |
10 | |
11 static inline V | |
12 foo (unsigned char n, unsigned short o, unsigned int p, U q, U r, U s) | |
13 { | |
14 unsigned int t; | |
15 o <<= 5; | |
16 q[7] >>= __builtin_add_overflow (0xfffffff0, __builtin_ffs (n), &s[5]); | |
17 t = __builtin_ffs (g[7]); | |
18 e *= __builtin_sub_overflow (o, t, &f); | |
19 return f + (V) g + (V) h + (V) q + i + (V) j + (V) s + (V) k + l; | |
20 } | |
21 | |
22 int | |
23 main () | |
24 { | |
25 if (__SIZEOF_INT128__ != 16 || __SIZEOF_INT__ != 4 || __CHAR_BIT__ != 8) | |
26 return 0; | |
27 V x = foo (0, 1, 5, (U) { }, (U) { }, (U) { }); | |
28 for (unsigned i = 0; i < 4; i++) | |
29 if ((unsigned int) x[i] != 0x20) | |
30 __builtin_abort (); | |
31 return 0; | |
32 } |