[oe-commits] Khem Raj : gcc-4.5: Fix ICE found while compiling mplayer

git version control git at git.openembedded.org
Tue Oct 5 21:25:01 UTC 2010


Module: openembedded.git
Branch: master
Commit: 607ae31d3e5cdbc6b1842f0ad02f1c8037f4b97c
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=607ae31d3e5cdbc6b1842f0ad02f1c8037f4b97c

Author: Khem Raj <raj.khem at gmail.com>
Date:   Tue Oct  5 14:15:39 2010 -0700

gcc-4.5: Fix ICE found while compiling mplayer

Signed-off-by: Khem Raj <raj.khem at gmail.com>

---

 recipes/gcc/gcc-4.5.inc                            |    3 +-
 .../gcc/gcc-4.5/gcc-scalar-widening-pr45847.patch  |   65 ++++++++++++++++++++
 2 files changed, 67 insertions(+), 1 deletions(-)

diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc
index fe719da..36d12ec 100644
--- a/recipes/gcc/gcc-4.5.inc
+++ b/recipes/gcc/gcc-4.5.inc
@@ -8,7 +8,7 @@ DEPENDS = "mpfr gmp libmpc libelf"
 NATIVEDEPS = "mpfr-native gmp-native libmpc-native"
 
 
-INC_PR = "r11"
+INC_PR = "r12"
 
 SRCREV = "164562"
 PV = "4.5"
@@ -118,6 +118,7 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH} \
 	   file://linaro/gcc-4.5-linaro-r99397.patch \
 	   file://linaro/gcc-4.5-linaro-r99398.patch \
 	   file://gcc-vmovl-PR45805.patch \
+	   file://gcc-scalar-widening-pr45847.patch \
 	  "
 
 SRC_URI_append_mips64 = " file://mips64-nomultilib.patch"
diff --git a/recipes/gcc/gcc-4.5/gcc-scalar-widening-pr45847.patch b/recipes/gcc/gcc-4.5/gcc-scalar-widening-pr45847.patch
new file mode 100644
index 0000000..74fb20c
--- /dev/null
+++ b/recipes/gcc/gcc-4.5/gcc-scalar-widening-pr45847.patch
@@ -0,0 +1,65 @@
+Hi,
+
+The attached patch fixes Bugzilla 45847
+(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45847). When compiling
+without -mvectorize-with-neon-quad and vectorizing scalar widening
+operations that widen words to double words, there are no corresponding
+vector types for DI scalar types. For this scenario, a call to
+get_vect_type_for_scalar_type() returns NULL and an absent NULL-check
+caused this segfault. The attached patch adds this NULL-check. Also,
+this is consistent with all the other places where a NULL-check follows
+a call to get_vect_type_for_scalar_type() in tree-vect-patterns.c. 
+
+Regression tested with arm-linux-gnueabi. OK?
+
+--
+Tejas Belagod
+ARM.
+
+gcc/
+
+2010-10-05  Tejas Belagod  <tejas.belagod at arm.com>
+
+	* tree-vect-patterns.c (vect_recog_widen_mult_pattern): Add NULL
+	check for vectype_out returned by get_vectype_for_scalar_type().
+
+testsuite/
+
+2010-10-05  Tejas Belagod  <tejas.belagod at arm.com>
+
+	* gcc.dg/vect/pr45847.c: New test.
+
+Index: gcc-4.5/gcc/testsuite/gcc.dg/vect/pr45847.c
+===================================================================
+--- /dev/null
++++ gcc-4.5/gcc/testsuite/gcc.dg/vect/pr45847.c
+@@ -0,0 +1,15 @@
++/* { dg-do compile } */
++
++
++long long foo (long long *__restrict a,  int *__restrict b, int *__restrict c )
++{
++  int i;
++  long long sum=0;
++  for (i=0;i<256;i++)
++   sum += (long long)b[i] * c[i];
++
++  return sum;
++}
++
++/* { dg-final { cleanup-tree-dump "vect" } } */
++
+Index: gcc-4.5/gcc/tree-vect-patterns.c
+===================================================================
+--- gcc-4.5.orig/gcc/tree-vect-patterns.c
++++ gcc-4.5/gcc/tree-vect-patterns.c
+@@ -410,7 +410,8 @@ vect_recog_widen_mult_pattern (gimple la
+ 
+   /* Check target support  */
+   vectype = get_vectype_for_scalar_type (half_type0);
+-  if (!vectype
++  if (!vec_type
++      || !vectype_out
+       || !supportable_widening_operation (WIDEN_MULT_EXPR, last_stmt, vectype,
+ 					  &dummy, &dummy, &dummy_code,
+ 					  &dummy_code, &dummy_int, &dummy_vec))





More information about the Openembedded-commits mailing list