diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr36111.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr36111.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr36111.c b/gcc/testsuite/gcc.dg/pr36111.c new file mode 100644 index 000000000..498c39e1b --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr36111.c @@ -0,0 +1,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) ); +} + |