summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr36111.c
blob: 498c39e1be49dc7dcd74d3861bc352f293c09e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fpic" } */

typedef struct {
  int lock;
  int pad0_;
} mutex_t;

static mutex_t main_arena;

void __malloc_check_init()
{
  for(;;)
    __asm__ __volatile__ ("": "+m"(main_arena.lock) );
}