core/gcc to 4.8.2-4

This commit is contained in:
Kevin Mihelich 2013-11-11 04:09:36 +00:00
parent d54163ec55
commit ee424e13df
2 changed files with 43 additions and 3 deletions

View file

@ -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"

View file

@ -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