| 1 |
/* PR rtl-optimization/99863 */ |
| 2 |
/* { dg-do run } */ |
| 3 |
/* { dg-options "-O -fno-tree-forwprop -mno-sse2 -Wno-psabi" } */ |
| 4 |
|
| 5 |
typedef unsigned char __attribute__((__vector_size__ (8))) A; |
| 6 |
typedef unsigned char __attribute__((__vector_size__ (32))) B; |
| 7 |
typedef unsigned char __attribute__((__vector_size__ (64))) C; |
| 8 |
typedef unsigned int __attribute__((__vector_size__ (32))) D; |
| 9 |
typedef unsigned int __attribute__((__vector_size__ (64))) E; |
| 10 |
typedef unsigned long long F; |
| 11 |
|
| 12 |
D a; |
| 13 |
A b; |
| 14 |
|
| 15 |
A |
| 16 |
foo (E x, F y) |
| 17 |
{ |
| 18 |
D c = (y <= 0) * a; |
| 19 |
x *= (0 < y); |
| 20 |
C d = (C) x; |
| 21 |
B e = ((union { C a; B b[2];}) d).b[0] + (B) c; |
| 22 |
A f = ((union { B a; A b[4];}) e).b[0] + (A) b; |
| 23 |
return f; |
| 24 |
} |
| 25 |
|
| 26 |
int |
| 27 |
main () |
| 28 |
{ |
| 29 |
F x = (F) foo ((E) { 3 }, 5); |
| 30 |
if (x != 3) |
| 31 |
__builtin_abort (); |
| 32 |
return 0; |
| 33 |
} |