From ee424e13dfc32742bccf3dd4f2137c6b0f73518f Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Mon, 11 Nov 2013 04:09:36 +0000 Subject: [PATCH] core/gcc to 4.8.2-4 --- core/gcc/PKGBUILD | 11 +++++++--- core/gcc/gcc-4.8-lambda-ICE.patch | 35 +++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 core/gcc/gcc-4.8-lambda-ICE.patch diff --git a/core/gcc/PKGBUILD b/core/gcc/PKGBUILD index b80a8ed54..1c3ad1909 100644 --- a/core/gcc/PKGBUILD +++ b/core/gcc/PKGBUILD @@ -16,7 +16,7 @@ noautobuild=1 pkgname=('gcc' 'gcc-libs' 'gcc-fortran' 'gcc-objc' 'gcc-go') pkgver=4.8.2 -pkgrel=3 +pkgrel=4 #_snapshot=4.8-20130725 pkgdesc="The GNU Compiler Collection" arch=('i686' 'x86_64') @@ -27,10 +27,12 @@ checkdepends=('dejagnu' 'inetutils') options=('!emptydirs' '!distcc') source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2 #ftp://gcc.gnu.org/pub/gcc/snapshots/${_snapshot}/gcc-${_snapshot}.tar.bz2 - gcc-4.8-filename-output.patch) + gcc-4.8-filename-output.patch + gcc-4.8-lambda-ICE.patch) md5sums=('a3d7d63b9cb6b6ea049469a0c4a43c9d' 'bd7330bd41845929f1e0efb3b7d0a060' - '40cb437805e2f7a006aa0d0c3098ab0f') + '40cb437805e2f7a006aa0d0c3098ab0f' + '6eb6e080dbf7bc6825f53a0aaa6c4ef9') if [ -n "${_snapshot}" ]; then _basedir=gcc-${_snapshot} @@ -52,6 +54,9 @@ prepare() { # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653 patch -p0 -i ${srcdir}/gcc-4.8-filename-output.patch + # http://gcc.gnu.org/bugzilla//show_bug.cgi?id=56710 - commit 3d1f8279 + patch -p1 -i ${srcdir}/gcc-4.8-lambda-ICE.patch + # ALARM: Specify build host types, triplet patch [[ $CARCH == "arm" ]] && CONFIGFLAG="--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi" [[ $CARCH == "armv6h" ]] && CONFIGFLAG="--host=armv6l-unknown-linux-gnueabihf --build=armv6l-unknown-linux-gnueabihf --with-arch=armv6 --with-float=hard --with-fpu=vfp" diff --git a/core/gcc/gcc-4.8-lambda-ICE.patch b/core/gcc/gcc-4.8-lambda-ICE.patch new file mode 100644 index 000000000..cf77a9b35 --- /dev/null +++ b/core/gcc/gcc-4.8-lambda-ICE.patch @@ -0,0 +1,35 @@ +diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c +index 0b8e2f7..ad1c209 100644 +--- a/gcc/cp/semantics.c ++++ b/gcc/cp/semantics.c +@@ -2719,8 +2719,10 @@ finish_member_declaration (tree decl) + /*friend_p=*/0); + } + } +- /* Enter the DECL into the scope of the class. */ +- else if (pushdecl_class_level (decl)) ++ /* Enter the DECL into the scope of the class, if the class ++ isn't a closure (whose fields are supposed to be unnamed). */ ++ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type) ++ || pushdecl_class_level (decl)) + { + if (TREE_CODE (decl) == USING_DECL) + { +diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C +new file mode 100644 +index 0000000..df2b037 +--- /dev/null ++++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C +@@ -0,0 +1,9 @@ ++// PR c++/56710 ++// { dg-options "-std=c++11 -Wall" } ++ ++int main() ++{ ++ int t = 0; ++ return [&]() -> int {int __t; __t = t; return __t; }(); ++ return [&t]() -> int {int __t; __t = t; return __t; }(); ++} +-- +1.8.4.2 +