PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr61923.c
blob0ef8af50694c7e2d2e7174941b73acbf096bbecc
1 /* PR debug/61923 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fcompare-debug" } */
5 typedef struct
7 struct
9 struct
11 char head;
12 } tickets;
14 } arch_spinlock_t;
15 struct ext4_map_blocks
17 int m_lblk;
18 int m_len;
19 int m_flags;
21 int ext4_da_map_blocks_ei_0;
22 void fn2 (int, int);
23 void fn1 (int p1, struct ext4_map_blocks *p2)
25 int ret;
26 if (p2->m_flags)
28 ext4_da_map_blocks_ei_0++;
29 arch_spinlock_t *lock;
30 switch (sizeof *&lock->tickets.head)
31 case 1:
32 asm("" : "+m"(*&lock->tickets.head) : ""(0));
33 __asm__("");
34 ret = 0;
36 fn2 (p2->m_lblk, p2->m_len);