1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3 /* { dg-require-effective-target nonpic } */
4 /* { dg-final { scan-assembler-not "12345" } } */
5 
myrnd(void)6 static inline unsigned int myrnd (void)
7 {
8     static unsigned int s = 1388815473;
9     s *= 1103515245;
10     s += 12345;
11 }
12 
13 struct __attribute__ ((packed)) A {
14     unsigned short i:1, l:1, j:3, k:11;
15 };
16 
17 struct A sA;
testA(void)18 void testA (void)
19 {
20     char *p = (char *) &sA;
21     *p++ = myrnd ();
22     *p++ = myrnd ();
23     sA.k = -1;
24 }
25