[gcc-6] 57/401: * Apply proposed patch for PR target/69129. Closes: #810081.

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:48:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch pu/reproducible_builds
in repository gcc-6.

commit 76ed96f76504292f9b6b12678d8a561c4df8e4a0
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Wed Jan 20 19:18:23 2016 +0000

      * Apply proposed patch for PR target/69129. Closes: #810081.
    
    
    git-svn-id: svn://anonscm.debian.org/gcccvs/branches/sid/gcc-6@8613 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog            |  5 +--
 debian/patches/pr69129.diff | 85 +++++++++++++++++++++++++++++++++++++++++++++
 debian/rules.patch          |  1 +
 3 files changed, 89 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 90a93c3..8ddb1c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,10 @@
-gcc-6 (6-20160117-2) experimental; urgency=medium
+gcc-6 (6-20160120-1) experimental; urgency=medium
 
-  * Fix gnat build failure on KFreeBSD (Steven Chamberlain). Closes: #811063).
+  * Fix gnat build failure on KFreeBSD (Steven Chamberlain). Closes: #811063.
   * Fix dependencies on target libraries which are not built anymore
     from this source.
   * Bump libmpx soname. Closes: #812084.
+  * Apply proposed patch for PR target/69129. Closes: #810081.
 
  -- Matthias Klose <doko at debian.org>  Mon, 18 Jan 2016 13:35:20 +0100
 
diff --git a/debian/patches/pr69129.diff b/debian/patches/pr69129.diff
new file mode 100644
index 0000000..1c0f9c0
--- /dev/null
+++ b/debian/patches/pr69129.diff
@@ -0,0 +1,85 @@
+# DP: Proposed patch for PR target/69129.
+
+--- a/src/gcc/config/mips/mips.c
++++ b/src/gcc/config/mips/mips.c
+@@ -10347,8 +10347,6 @@
+   memset (frame, 0, sizeof (*frame));
+   size = get_frame_size ();
+ 
+-  cfun->machine->global_pointer = mips_global_pointer ();
+-
+   /* The first two blocks contain the outgoing argument area and the $gp save
+      slot.  This area isn't needed in leaf functions.  We can also skip it
+      if we know that none of the called functions will use this space.
+@@ -10375,6 +10373,26 @@
+       frame->args_size = crtl->outgoing_args_size;
+       frame->cprestore_size = MIPS_GP_SAVE_AREA_SIZE;
+     }
++
++  /* MIPS16 code offsets the frame pointer by the size of the outgoing
++     arguments.  This tends to increase the chances of using unextended
++     instructions for local variables and incoming arguments.  */
++  if (TARGET_MIPS16)
++    frame->hard_frame_pointer_offset = frame->args_size;
++
++  /* PR 69129: Beware of a possible race condition.  mips_global_pointer
++     might call mips_cfun_has_inflexible_gp_ref_p which in turn can call
++     mips_find_gp_ref which will iterate over the current insn sequence.
++     If any of these insns use the cprestore_save_slot_operand or
++     cprestore_load_slot_operand predicates in order to be recognised then
++     they will call mips_cprestore_address_p which calls
++     mips_get_cprestore_base_and_offset which expects the frame information
++     to be filled in...  In fact mips_get_cprestore_base_and_offset only
++     needs the args_size and hard_frame_pointer_offset fields to be filled
++     in, which is why the global_pointer field is initialised here and not
++     earlier.  */
++  cfun->machine->global_pointer = mips_global_pointer ();
++
+   offset = frame->args_size + frame->cprestore_size;
+ 
+   /* Move above the local variables.  */
+@@ -10520,12 +10538,6 @@
+     frame->acc_save_offset = frame->acc_sp_offset - offset;
+   if (frame->num_cop0_regs > 0)
+     frame->cop0_save_offset = frame->cop0_sp_offset - offset;
+-
+-  /* MIPS16 code offsets the frame pointer by the size of the outgoing
+-     arguments.  This tends to increase the chances of using unextended
+-     instructions for local variables and incoming arguments.  */
+-  if (TARGET_MIPS16)
+-    frame->hard_frame_pointer_offset = frame->args_size;
+ }
+ 
+ /* Return the style of GP load sequence that is being used for the
+--- /dev/null
++++ b/src/gcc/testsuite/gcc.target/mips/pr69129.c
+@@ -0,0 +1,29 @@
++_Noreturn void fn1 (int) __attribute__((__visibility__("hidden")));
++
++void
++fn2 (void *p1)
++{
++  int a[7];
++  float *b;
++  int c, n;
++
++  if (c != p1) /* { dg-warning "comparison between pointer and integer" } */
++    fn1 (1);
++
++  n = 0;
++  for (; c; n++)
++    {
++      int d;
++      if (a[n] != d)
++	fn1(n);
++    }
++
++  b = p1;
++
++  while (1)
++    {
++      *b = 3.40282347e38f;
++      if (a[0])
++	return;
++    }
++}
diff --git a/debian/rules.patch b/debian/rules.patch
index 6439fa1..832314c 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -81,6 +81,7 @@ debian_patches += \
 	pr67590 \
 	ada-gnattools-ldflags \
 	libjit-ldflags \
+	pr69129 \
 
 # this is still needed on powerpc, e.g. firefox and insighttoolkit4 will ftbfs.
 ifneq (,$(filter $(DEB_TARGET_ARCH),powerpc))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/gcc-6.git



More information about the Reproducible-commits mailing list