PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / pr53060.c
blobdb5acbdb6ea24f7faeccf836a14989756ffa6da6
1 /* { dg-do run } */
3 extern void abort (void);
5 int f(void) { return 2; }
6 unsigned int g(void) { return 5; }
7 unsigned int h = 1;
9 typedef unsigned int vec __attribute__((vector_size(16)));
11 vec i = { 1, 2, 3, 4};
13 vec fv1(void) { return i + (h ? f() : g()); }
14 vec fv2(void) { return (h ? f() : g()) + i; }
16 int main()
18 vec i, j;
19 j = fv1();
20 if (j[0] != 3) abort();
21 i = fv2();
22 if (i[0] != 3) abort();
23 return 0;
26 /* Ignore a warning that is irrelevant to the purpose of this test. */
27 /* { dg-prune-output ".*GCC vector returned by reference.*" } */