diff --git a/mingw-w64-gcc-git/0016-gcc-6-branch-PR-c-71092-ICE-with-array-and-constexpr.patch b/mingw-w64-gcc-git/0016-gcc-6-branch-PR-c-71092-ICE-with-array-and-constexpr.patch deleted file mode 100644 index ee5fb76bb9..0000000000 --- a/mingw-w64-gcc-git/0016-gcc-6-branch-PR-c-71092-ICE-with-array-and-constexpr.patch +++ /dev/null @@ -1,111 +0,0 @@ -From e743361cb91a7e1b8572c2c125ad2ddf69eed890 Mon Sep 17 00:00:00 2001 -From: jason -Date: Fri, 15 Jul 2016 18:49:38 +0000 -Subject: [PATCH] PR c++/71092 - ICE with array and constexpr. - - * constexpr.c (cxx_eval_call_expression): Fail quietly when cgraph - threw away DECL_SAVED_TREE. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238395 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/cp/constexpr.c | 14 +++++- - gcc/testsuite/g++.dg/cpp0x/constexpr-array17.C | 61 ++++++++++++++++++++++++++ - 2 files changed, 73 insertions(+), 2 deletions(-) - create mode 100644 gcc/testsuite/g++.dg/cpp0x/constexpr-array17.C - -diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c -index 55b05e7..4c98518 100644 ---- a/gcc/cp/constexpr.c -+++ b/gcc/cp/constexpr.c -@@ -1450,9 +1450,19 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, - } - else - { -- if (!result || result == error_mark_node) -+ if (result && result != error_mark_node) -+ /* OK */; -+ else if (!DECL_SAVED_TREE (fun)) -+ { -+ /* When at_eof >= 2, cgraph has started throwing away -+ DECL_SAVED_TREE, so fail quietly. FIXME we get here because of -+ late code generation for VEC_INIT_EXPR, which needs to be -+ completely reconsidered. */ -+ gcc_assert (at_eof >= 2 && ctx->quiet); -+ *non_constant_p = true; -+ } -+ else - { -- gcc_assert (DECL_SAVED_TREE (fun)); - tree body, parms, res; - - /* Reuse or create a new unshared copy of this function's body. */ -diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array17.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array17.C -new file mode 100644 -index 0000000..c6afa50 ---- /dev/null -+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array17.C -@@ -0,0 +1,61 @@ -+// PR c++/71092 -+// { dg-do compile { target c++11 } } -+ -+template struct A { using type = _Default; }; -+template class> -+using __detected_or = A<_Default>; -+template class _Op> -+using __detected_or_t = typename __detected_or<_Default, _Op>::type; -+template struct B { typedef _Tp value_type; }; -+struct C { -+ template using __pointer = typename _Tp::pointer; -+}; -+template struct J : C { -+ using pointer = __detected_or_t; -+}; -+template void _Construct(_T1 *) { new _T1; } -+struct D { -+ template -+ static _ForwardIterator __uninit_default_n(_ForwardIterator p1, _Size) { -+ _Construct(p1); -+ } -+}; -+template -+void __uninitialized_default_n(_ForwardIterator p1, _Size) { -+ D::__uninit_default_n(p1, 0); -+} -+template -+void __uninitialized_default_n_a(_ForwardIterator p1, _Size, _Tp) { -+ __uninitialized_default_n(p1, 0); -+} -+template struct __shared_ptr { -+ constexpr __shared_ptr() : _M_ptr(), _M_refcount() {} -+ int _M_ptr; -+ int _M_refcount; -+}; -+template struct F { -+ typedef _Alloc _Tp_alloc_type; -+ struct G { -+ typename J<_Tp_alloc_type>::pointer _M_start; -+ G(_Tp_alloc_type); -+ }; -+ F(int, _Alloc p2) : _M_impl(p2) {} -+ G _M_impl; -+}; -+template > struct K : F<_Alloc> { -+ typedef _Alloc allocator_type; -+ K(int, allocator_type p2 = allocator_type()) : F<_Alloc>(0, p2) { -+ __uninitialized_default_n_a(this->_M_impl._M_start, 0, 0); -+ } -+}; -+struct H { -+ H(); -+ struct I { -+ __shared_ptr trigger[1]; -+ }; -+ __shared_ptr resetTrigger_; -+ K states_; -+ __shared_ptr triggerManager_; -+}; -+__shared_ptr a; -+H::H() : states_(0), triggerManager_(a) {} --- -2.9.1 - diff --git a/mingw-w64-gcc-git/PKGBUILD b/mingw-w64-gcc-git/PKGBUILD index 012371a829..5aefeac344 100644 --- a/mingw-w64-gcc-git/PKGBUILD +++ b/mingw-w64-gcc-git/PKGBUILD @@ -61,7 +61,6 @@ source=("git://gcc.gnu.org/git/gcc.git#branch=${_branch}" "0014-gcc-5-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch" "0014-gcc-6-branch-clone_function_name_1-Retain-any-stdcall-suffix.patch" "0015-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch" - "0016-gcc-6-branch-PR-c-71092-ICE-with-array-and-constexpr.patch" "9999-gcc-6-branch-Add-defines-to-disable-optimize-for-size-changes.patch") sha256sums=('SKIP' '49a5e264e611de7f2388f01ba649ec22cf3ae1cde3ba45082a7d72294c2f4fd7' @@ -81,7 +80,6 @@ sha256sums=('SKIP' 'ad4bb777a7f19070e83bdf5046281ee9e359ed039c70179285c4119244cf9093' '60a58ed41389691a68ef4b7d47a0328df4d28d26e6c680a6b06b31191481ca65' '262c6fb0f6c9951d69e4c2dcc27949aa8f2cca8e672faf66740a7dbba4a4cd2c' - '2f422c1c3c90145072c8636cf5ee94419d4f7872741fcff913fa65b3a98df570' 'a82eadfbb6a182b1ffeb860e89c89f46373a8b891594280b2268ecac8d7bac88') _threads="posix" @@ -109,7 +107,6 @@ prepare() { ${GIT_AM} "${srcdir}"/0013-MinGW-w64-Enable-shared-gnat.patch ${GIT_AM} "${srcdir}"/0014-${_branch}-clone_function_name_1-Retain-any-stdcall-suffix.patch ${GIT_AM} "${srcdir}"/0015-Force-linking-to-libgcc_s_dw2-1.dll-deprecated.patch - ${GIT_AM} "${srcdir}"/0016-gcc-6-branch-PR-c-71092-ICE-with-array-and-constexpr.patch # ${GIT_AM} "${srcdir}"/9999-gcc-6-branch-Add-defines-to-disable-optimize-for-size-changes.patch # do not expect $prefix/mingw symlink - this should be superceded by