1 /* { dg-do run } */
2 /* { dg-additional-options "-fgcse-after-reload" } */
3
4 int a, b, c, d, e;
5
6 static __attribute__ ((__noipa__))
foo(int i)7 int foo (int i)
8 {
9 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
10 __builtin_memmove (&i, &e, 1);
11 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
12 __builtin_memmove ((char *) &i + sizeof (i) - 1,
13 (char *) &e + sizeof (e) - 1, 1);
14 #elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
15 __builtin_memmove ((char *) &i + sizeof (i) - 2,
16 (char *) &e + sizeof (e) - 2, 1);
17 #else
18 #error "endian unknown?"
19 #endif
20 if (a > 0)
21 i /= e;
22 e /= 5;
23 b = 0;
24 return i + c + d + 5;
25 }
26
27 int
main(void)28 main (void)
29 {
30 int x = foo (4);
31 if (x != 5)
32 __builtin_abort ();
33 return 0;
34 }
35