[gcc-7] 53/354: * Fix PR middle-end/78501, proposed patch.

Ximin Luo infinity0 at debian.org
Thu Nov 23 15:50:29 UTC 2017


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

infinity0 pushed a commit to branch master
in repository gcc-7.

commit 6e0c8795a1265d99f53d2e0165e88f42742cb533
Author: doko <doko at 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>
Date:   Thu Nov 24 14:43:08 2016 +0000

      * Fix PR middle-end/78501, proposed patch.
    
    
    git-svn-id: svn+ssh://svn.debian.org/svn/gcccvs/branches/sid/gcc-7@9137 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
---
 debian/changelog            |  7 ++++---
 debian/patches/pr78501.diff | 34 ++++++++++++++++++++++++++++++++++
 debian/rules.patch          |  1 +
 3 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f75a583..5a06ce1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,6 @@
-gcc-7 (7-20161117-1) UNRELEASED; urgency=medium
+gcc-7 (7-20161124-1) UNRELEASED; urgency=medium
 
-  * GCC 7 snapshot build, taken from the trunk 20161117.
+  * GCC 7 snapshot build, taken from the trunk 20161124.
 
   [ Matthias Klose ]
   * Update libgphobos symbol files.
@@ -11,12 +11,13 @@ gcc-7 (7-20161117-1) UNRELEASED; urgency=medium
   * Add pkg-config to the build dependencies.
   * Drop the work around for PR libstdc++/65913.
   * gdc: Link with the shared libgphobos runtime by default.
+  * Fix PR middle-end/78501, proposed patch.
 
   [ YunQiang Su ]
   * Update gnat patches for GCC 7, stop building libgnatvsn and libgnatprj.
     Addresses: #844367.
 
- -- Matthias Klose <doko at debian.org>  Thu, 17 Nov 2016 13:58:09 +0100
+ -- Matthias Klose <doko at debian.org>  Thu, 24 Nov 2016 15:42:23 +0100
 
 gcc-7 (7-20161116-1) experimental; urgency=medium
 
diff --git a/debian/patches/pr78501.diff b/debian/patches/pr78501.diff
new file mode 100644
index 0000000..77fb61b
--- /dev/null
+++ b/debian/patches/pr78501.diff
@@ -0,0 +1,34 @@
+# DP: Proposed patch for PR middle-end/78501
+
+--- a/src/gcc/tree-vrp.c	
++++ b/src/gcc/tree-vrp.c	
+@@ -4028,15 +4028,20 @@ extract_range_basic (value_range *vr, gimple *stmt)
+ 	  }
+ 	  return;
+ 	case CFN_BUILT_IN_STRLEN:
+-	  {
+-	    tree type = TREE_TYPE (gimple_call_lhs (stmt));
+-	    tree max = vrp_val_max (ptrdiff_type_node);
+-	    wide_int wmax = wi::to_wide (max, TYPE_PRECISION (TREE_TYPE (max)));
+-	    tree range_min = build_zero_cst (type); 
+-	    tree range_max = wide_int_to_tree (type, wmax - 1);
+-	    set_value_range (vr, VR_RANGE, range_min, range_max, NULL);
+-	  }
+-	  return;
++	  if (tree lhs = gimple_call_lhs (stmt))
++	    if (ptrdiff_type_node
++		&& (TYPE_PRECISION (ptrdiff_type_node)
++		    == TYPE_PRECISION (TREE_TYPE (lhs))))
++	      {
++		tree type = TREE_TYPE (lhs);
++		tree max = vrp_val_max (ptrdiff_type_node);
++		wide_int wmax = wi::to_wide (max, TYPE_PRECISION (TREE_TYPE (max)));
++		tree range_min = build_zero_cst (type);
++		tree range_max = wide_int_to_tree (type, wmax - 1);
++		set_value_range (vr, VR_RANGE, range_min, range_max, NULL);
++		return;
++	      }
++	  break;
+ 	default:
+ 	  break;
+ 	}
diff --git a/debian/rules.patch b/debian/rules.patch
index b062dd4..8677613 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -225,6 +225,7 @@ debian_patches += gcc-ice-apport
 debian_patches += skip-bootstrap-multilib
 debian_patches += libffi-ro-eh_frame_sect
 debian_patches += libffi-mips
+debian_patches += pr78501
 
 # sigaction on sparc changed between glibc 2.19 and 2.21
 ifeq (,$(filter 2.1%, $(shell dpkg-query -l libc-bin | awk '/^.i/ {print $$3}')))

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



More information about the Reproducible-commits mailing list