1 /* { dg-do run } */
2 /* { dg-options "-O" } */
3 int
main(void)4 main (void)
5 {
6   /* Test constant folding.  */
7   extern void link_error (void);
8 
9   if (__builtin_bswap16(0xaabb) != 0xbbaa)
10     link_error ();
11 
12   if (__builtin_bswap32(0xaabbccdd) != 0xddccbbaa)
13     link_error ();
14 
15   if (__builtin_bswap64(0x1122334455667788ULL) != 0x8877665544332211ULL)
16     link_error ();
17 
18   return 0;
19 }
20