1 /* This revealed a bug when rotates are expanded into
5 /* { dg-options "-O1 -std=c99" } */
7 extern void abort (void);
9 #if __INT_MAX__ == 2147483647
10 typedef unsigned int uint32_t;
11 #elif __LONG_MAX__ == 2147483647
12 typedef unsigned long uint32_t;
14 #error unable to find 32-bit integer type
18 f (uint32_t *S
, int j
)
20 uint32_t A
, B
, k
, L
[2] = {1234, 5678};
24 for (i
= 0; i
< j
; i
++)
26 k
= (S
[i
] + A
+ B
) & 0xffffffffL
;
28 ((k
<< (3 & 0x1f)) | ((k
& 0xffffffff) >> (32 - (3 & 0x1f))));
31 k
= (L
[i
] + A
+ B
) & 0xffffffffL
;
33 ((k
<< (m
& 0x1f)) | ((k
& 0xffffffff) >> (32 - (m
& 0x1f))));
41 uint32_t S
[2] = {0xffff, 0xffffff};
43 if (f (S
,2)!= 1392607300)