diff mbox

patch to fix PR63527

Message ID CAMe9rOq+kKKEtPbL11gPyLi12KZG2ztPRw6uZ8LPNr73rhesFg@mail.gmail.com
State New
Headers show

Commit Message

H.J. Lu Nov. 25, 2014, 8:54 p.m. UTC
On Tue, Nov 25, 2014 at 12:22 PM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> The following patch fixes
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63527
>
> The patch was tested and bootstrapped on x86/x86-64.
>
> Committed as rev. 218509.
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63527

I checked in this testcase.

Thanks.
diff mbox

Patch

Index: ChangeLog
===================================================================
--- ChangeLog (revision 218060)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@ 
+2014-11-25  H.J. Lu  <hongjiu.lu@intel.com>
+
+ PR target/63527
+ * gcc.target/i386/pr63527.c: New test.
+
 2014-11-25  Martin Liska  <mliska@suse.cz>

  PR bootstrap/64050
Index: gcc.target/i386/pr63527.c
===================================================================
--- gcc.target/i386/pr63527.c (revision 0)
+++ gcc.target/i386/pr63527.c (working copy)
@@ -0,0 +1,25 @@ 
+/* PR rtl-optimization/pr63527 */
+/* { dg-do compile { target { ia32 && fpic } } } */
+/* { dg-options "-O2 -fPIC" } */
+
+struct cache_file
+{
+  char magic[sizeof "ld.so-1.7.0" - 1];
+  unsigned int nlibs;
+};
+typedef unsigned int size_t;
+size_t cachesize __attribute__ ((visibility ("hidden")));
+struct cache_file *cache __attribute__ ((visibility ("hidden")));
+extern int __munmap (void *__addr, size_t __len);
+void
+_dl_unload_cache (void)
+{
+  if (cache != ((void *)0) && cache != (struct cache_file *) -1)
+    {
+      __munmap (cache, cachesize);
+      cache = ((void *)0) ;
+    }
+}
+
+/* We shouldn't load EBX again.  */
+/* { dg-final { scan-assembler-not "movl\[ \t\]%\[^,\]+, %ebx" } } */