libstdc++: Fix find_last_set(simd_mask) to ignore padding bits
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20061220-1.c
blobb33efc6e6dba59a76ad3ac880bc6f605b3499cc2
1 /* PR middle-end/30262 */
2 /* { dg-skip-if "asm statements do not work as expected" { rl78-*-* } } */
3 extern void abort (void);
5 int
6 foo (void)
8 unsigned int x = 0;
10 void nested (void)
12 x = 254;
15 nested ();
16 asm volatile ("" :: "r" (x));
17 asm volatile ("" :: "m" (x));
18 asm volatile ("" :: "mr" (x));
19 asm volatile ("" : "=r" (x) : "0" (x));
20 asm volatile ("" : "=m" (x) : "m" (x));
21 return x;
24 int
25 bar (void)
27 unsigned int x = 0;
29 void nested (void)
31 asm volatile ("" :: "r" (x));
32 asm volatile ("" :: "m" (x));
33 asm volatile ("" :: "mr" (x));
34 x += 4;
35 asm volatile ("" : "=r" (x) : "0" (x));
36 asm volatile ("" : "=m" (x) : "m" (x));
39 nested ();
40 return x;
43 int
44 baz (void)
46 unsigned int x = 0;
48 void nested (void)
50 void nested2 (void)
52 asm volatile ("" :: "r" (x));
53 asm volatile ("" :: "m" (x));
54 asm volatile ("" :: "mr" (x));
55 x += 4;
56 asm volatile ("" : "=r" (x) : "0" (x));
57 asm volatile ("" : "=m" (x) : "m" (x));
59 nested2 ();
60 nested2 ();
63 nested ();
64 return x;
67 int
68 main (void)
70 if (foo () != 254 || bar () != 4 || baz () != 8)
71 abort ();
72 return 0;