[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / gcc.dg / pr53060.c
blob503f05407742eff5bc7dad4852c23329ff1db095
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.*" } */
28 /* { dg-prune-output "changes the ABI" } */