gcc-4.7: fix gcc ICE when building with gcc-4.8
PATCH 1/1 gcc-4.7: fix gcc ICE when building with gcc-4.8
Backport fix for internal compiler error when building gcc-4.7.2 with a gcc-4.8.0 host gcc.
See upstream bug here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56308
--- meta/recipes-devtools/gcc/gcc-4.7.inc | 3 +- .../gcc/gcc-4.7/avoid-oob-array-access.patch | 45 ++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patch
meta/recipes-devtools/gcc/gcc-4.7.inc +2 -1
@@ -1,6 +1,6 @@ require gcc-common.inc -PR = "r19" +PR = "r20" # Third digit in PV should be incremented after a minor release # happens from this branch on gcc e.g. currently its 4.7.1
@@ -77,6 +77,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ file://use-ml-conf-files-from-B.patch \ file://wcast-qual-PR55383.patch \ file://disable-texinfo-5.patch \ + file://avoid-oob-array-access.patch \ " SRC_URI[md5sum] = "cc308a0891e778cfda7a151ab8a6e762" SRC_URI[sha256sum] = "8a9283d7010fb9fe5ece3ca507e0af5c19412626384f8a5e9434251ae100b084"
meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patch new file +45 -0
45 lines not on this page · raw message
Signature · 1 line
1.8.2.2
looks good. Please send a cherry pick request for dylan too
Quoted 90 lines · Josh Cartwright
Backport fix for internal compiler error when building gcc-4.7.2 with a gcc-4.8.0 host gcc.
See upstream bug here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56308
Signed-off-by Josh Cartwright <[email protected]>---
meta/recipes-devtools/gcc/gcc-4.7.inc | 3 +-.../gcc/gcc-4.7/avoid-oob-array-access.patch| 45 ++++++++++++++++++++++2 files changed, 47 insertions(+), 1 deletion(-)create mode 100644
meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patchmeta/recipes-devtools/gcc/gcc-4.7.inc +0
-0@@ -1,6 +1,6 @@require gcc-common.inc
meta/recipes-devtools/gcc/gcc-4.7.inc +1
-1-PR = "r19" +PR = "r20"# Third digit in PV should be incremented after a minor release
# happens from this branch on gcc e.g. currently its 4.7.1meta/recipes-devtools/gcc/gcc-4.7.inc +1
-0@@ -77,6 +77,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ file://use-ml-conf-files-from-B.patch \ file://wcast-qual-PR55383.patch \ file://disable-texinfo-5.patch \ + file://avoid-oob-array-access.patch \ "SRC_URI[md5sum] = "
cc308a0891e778cfda7a151ab8a6e762"
SRC_URI[sha256sum] = "8a9283d7010fb9fe5ece3ca507e0af5c19412626384f8a5e9434251ae100b084"meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patch new file +45
-0@@ -0,0 +1,45 @@ +Upstream-Status: Backport + +See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56308 + +From 1e37e371d2cca3549b71a247bf79778aa1a9e1c4 Mon Sep 17 00:00:00 2001 +From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Fri, 21 Sep 2012 10:08:35 +0000 +Subject: [PATCH] 2012-09-21 Richard Guenther <[email protected]> + + PR middle-end/54638 + Backport from mainline + 2012-04-19 Richard Guenther <[email protected]> + + * ira-int.h (ira_allocno_object_iter_cond): Avoid out-of-bound + array access. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@191605 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/ChangeLog | 9 +++++++++ + gcc/ira-int.h | 9 +++++++-- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/gcc/ira-int.h b/gcc/ira-int.h +index 9faabb5..771a368 100644 +--- a/gcc/ira-int.h ++++ b/gcc/ira-int.h +@@ -1138,8 +1138,13 @@ static inline bool + ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a, + ira_object_t *o) + { +- *o = ALLOCNO_OBJECT (a, i->n); +- return i->n++ < ALLOCNO_NUM_OBJECTS (a); ++ int n = i->n++; ++ if (n < ALLOCNO_NUM_OBJECTS (a)) ++ { ++ *o = ALLOCNO_OBJECT (a, n); ++ return true; ++ } ++ return false; + } + + /* Loop over all objects associated with allocno A. In each +-- +1.8.2.2 +Signature · 6 lines
1.8.2.2 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core