2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr63527.c
blob169bc0859f625365bec4cacceda4d48df57ae552
1 /* PR rtl-optimization/pr63527 */
2 /* { dg-do compile { target { ia32 && fpic } } } */
3 /* { dg-options "-O2 -fPIC" } */
5 struct cache_file
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)
17 if (cache != ((void *)0) && cache != (struct cache_file *) -1)
19 __munmap (cache, cachesize);
20 cache = ((void *)0) ;
24 /* We shouldn't load EBX again. */
25 /* { dg-final { scan-assembler-not "movl\[ \t\]%\[^,\]+, %ebx" } } */