Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr71532.c
blobb10414f93f4e5dcca755316f7e0ea46e5efd9482
1 /* PR rtl-optimization/71532 */
2 /* { dg-do run } */
3 /* { dg-additional-options "-mtune=slm" { target i?86-*-* x86_64-*-* } } */
5 __attribute__((noinline, noclone, pure)) int
6 foo (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l)
8 a++; b++; c++; d++; e++; f++; g++; h++; i++; j++; k++; l++;
9 asm volatile ("" : : "g" (&a), "g" (&b), "g" (&c), "g" (&d) : "memory");
10 asm volatile ("" : : "g" (&e), "g" (&f), "g" (&g), "g" (&h) : "memory");
11 asm volatile ("" : : "g" (&i), "g" (&j), "g" (&k), "g" (&l) : "memory");
12 return a + b + c + d + e + f + g + h + i + j + k + l;
15 __attribute__((noinline, noclone, pure)) int
16 bar (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int k, int l)
18 a++; b++; c++; d++; e++; f++; g++; h++; i++; j++; k++; l++;
19 asm volatile ("" : : "g" (&a), "g" (&b), "g" (&c), "g" (&d) : "memory");
20 asm volatile ("" : : "g" (&e), "g" (&f), "g" (&g), "g" (&h) : "memory");
21 asm volatile ("" : : "g" (&i), "g" (&j), "g" (&k), "g" (&l) : "memory");
22 return 2 * a + b + c + d + e + f + g + h + i + j + k + l;
25 __attribute__((noinline, noclone)) int
26 test ()
28 int a = foo (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
29 a += bar (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
30 return a;
33 int
34 main ()
36 if (test () != 182)
37 __builtin_abort ();
38 return 0;