| 1 |
/* PR rtl-optimization/pr63527 */ |
| 2 |
/* { dg-do compile { target { ia32 && fpic } } } */ |
| 3 |
/* { dg-options "-O2 -fPIC" } */ |
| 4 |
|
| 5 |
struct cache_file |
| 6 |
{ |
| 7 |
char magic[sizeof "ld.so-1.7.0" - 1]; |
| 8 |
unsigned int nlibs; |
| 9 |
}; |
| 10 |
typedef unsigned int size_t; |
| 11 |
size_t cachesize __attribute__ ((visibility ("hidden"))); |
| 12 |
struct cache_file *cache __attribute__ ((visibility ("hidden"))); |
| 13 |
extern int __munmap (void *__addr, size_t __len); |
| 14 |
void |
| 15 |
_dl_unload_cache (void) |
| 16 |
{ |
| 17 |
if (cache != ((void *)0) && cache != (struct cache_file *) -1) |
| 18 |
{ |
| 19 |
__munmap (cache, cachesize); |
| 20 |
cache = ((void *)0) ; |
| 21 |
} |
| 22 |
} |
| 23 |
|
| 24 |
/* We shouldn't load EBX again. */ |
| 25 |
/* { dg-final { scan-assembler-not "movl\[ \t\]%\[^,\]+, %ebx" } } */ |