1 /* { dg-do run } */
2 
3 extern void abort (void);
4 
f(void)5 int                     f(void) { return 2; }
g(void)6 unsigned int            g(void) { return 5; }
7 unsigned int            h = 1;
8 
9 typedef unsigned int vec __attribute__((vector_size(16)));
10 
11 vec i = { 1, 2, 3, 4};
12 
fv1(void)13 vec fv1(void) { return i + (h ? f() : g()); }
fv2(void)14 vec fv2(void) { return (h ? f() : g()) + i; }
15 
main()16 int main()
17 {
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;
24 }
25 
26 /* Ignore a warning that is irrelevant to the purpose of this test.  */
27 /* { dg-prune-output ".*GCC vector returned by reference.*" } */
28