| --- gcc-4.8.2.orig/gcc/config/arm/t-arm-elf 2013-01-10 20:38:27.000000000 +0000 |
| +++ gcc-4.8.2/gcc/config/arm/t-arm-elf 2013-12-28 22:54:59.000000000 +0000 |
| @@ -25,22 +25,36 @@ |
| #MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te |
| #MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626 |
| |
| +# build a bunch of specialized versions of libcc for particular cores |
| +#MULTILIB_OPTIONS += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/cortex-a9/march=armv4t/march=armv5t/march=armv5te/march=armv6/march=armv6j/march=armv6k/march=armv6z/march=armv6zk/march=armv7-a/march=armv7-r |
| +#MULTILIB_DIRNAMES += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9 cortex-m3 armv4t armv5t armv5te armv6 armv6j armv6k armv6z armv6zk armv7-a armv7-r |
| +#MULTILIB_OPTIONS += mcpu=arm7tdmi/mcpu=arm9tdmi/mcpu=arm920t/mcpu=arm926ej-s/mcpu=arm1136j-s/mcpu=arm1136jf-s/mcpu=arm1176jz-s/mcpu=arm1176jzf-s/mcpu=xscale/mcpu=mpcore/mcpu=cortex-a8/mcpu=cortex-a9 |
| +#MULTILIB_DIRNAMES += arm7tdmi arm9tdmi arm920t arm926ej-s arm1136j-s arm1136jf-s arm1176jz-s arm1176jzf-s xscale mpcore cortex-a8 cortex-a9 |
| + |
| +MULTILIB_OPTIONS += march=armv7 |
| +MULTILIB_DIRNAMES += thumb2 |
| +MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7* |
| +MULTILIB_MATCHES += march?armv7=march?armv7-a |
| +MULTILIB_MATCHES += march?armv7=march?armv7-r |
| +MULTILIB_MATCHES += march?armv7=march?armv7-m |
| +MULTILIB_MATCHES += march?armv7=mcpu?cortex-a15 |
| +MULTILIB_MATCHES += march?armv7=mcpu?cortex-a9 |
| +MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8 |
| +MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4 |
| +MULTILIB_MATCHES += march?armv7=mcpu?cortex-m4 |
| +MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3 |
| + |
| +#MULTILIB_OPTIONS += mfpu=vfp |
| +#MULTILIB_DIRNAMES += vfp |
| +#MULTILIB_MATCHES += mfpu?vfp=mcpu?arm1136jf-s |
| +#MULTILIB_MATCHES += mfpu?vfp=mcpu?arm1136jzf-s |
| -#MULTILIB_OPTIONS += march=armv7 |
| -#MULTILIB_DIRNAMES += thumb2 |
| -#MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7* |
| -#MULTILIB_MATCHES += march?armv7=march?armv7-a |
| -#MULTILIB_MATCHES += march?armv7=march?armv7-r |
| -#MULTILIB_MATCHES += march?armv7=march?armv7-m |
| -#MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8 |
| -#MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4 |
| -#MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3 |
| |
| # Not quite true. We can support hard-vfp calling in Thumb2, but how do we |
| # express that here? Also, we really need architecture v5e or later |
| # (mcrr etc). |
| +#MULTILIB_OPTIONS += mfloat-abi=hard |
| +#MULTILIB_DIRNAMES += fpu |
| +#MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* |
| -MULTILIB_OPTIONS += mfloat-abi=hard |
| -MULTILIB_DIRNAMES += fpu |
| -MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* |
| #MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard* |
| #MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard* |
| |
| @@ -56,8 +70,8 @@ |
| # MULTILIB_DIRNAMES += fpu soft |
| # MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard* |
| # |
| +MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork |
| +MULTILIB_DIRNAMES += normal interwork |
| -# MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork |
| -# MULTILIB_DIRNAMES += normal interwork |
| # |
| # MULTILIB_OPTIONS += fno-leading-underscore/fleading-underscore |
| # MULTILIB_DIRNAMES += elf under |
| reverted: |
| --- gcc-4.8.2.orig/gcc/config/i386/t-x86_64-elf 1970-01-01 01:00:00.000000000 +0100 |
| +++ gcc-4.8.2/gcc/config/i386/t-x86_64-elf 2013-12-29 12:47:35.000000000 +0000 |
| @@ -0,0 +1,4 @@ |
| +# Add redzoneless libgcc |
| + |
| +MULTILIB_OPTIONS += mno-red-zone |
| +MULTILIB_DIRNAMES += no-red-zone |
| \ No newline at end of file |
| reverted: |
| --- gcc-4.8.2.orig/gcc/config.gcc 2013-10-03 01:47:24.000000000 +0100 |
| +++ gcc-4.8.2/gcc/config.gcc 2013-12-29 12:06:18.000000000 +0000 |
| @@ -1213,6 +1213,7 @@ |
| tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h" |
| ;; |
| x86_64-*-elf*) |
| + tmake_file="${tmake_file} i386/t-x86_64-elf" |
| tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h i386/x86-64.h" |
| ;; |
| i[34567]86-*-rdos*) |
| |
| |
| commit c75b90dacb047d2bf690925c9b45100accb85b98 |
| Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> |
| Date: Thu Jul 21 06:16:17 2016 +0000 |
| |
| 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/branches/gcc-6-branch@238574 138bc75d-0d04-0410-961f-82ee72b054a4 |
| |
| diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c |
| index 5f434aa..fba7905 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 <typename _Default> struct A { using type = _Default; }; |
| +template <typename _Default, template <typename> class> |
| +using __detected_or = A<_Default>; |
| +template <typename _Default, template <typename> class _Op> |
| +using __detected_or_t = typename __detected_or<_Default, _Op>::type; |
| +template <typename _Tp> struct B { typedef _Tp value_type; }; |
| +struct C { |
| + template <typename _Tp> using __pointer = typename _Tp::pointer; |
| +}; |
| +template <typename _Alloc> struct J : C { |
| + using pointer = __detected_or_t<typename _Alloc::value_type *, __pointer>; |
| +}; |
| +template <typename _T1> void _Construct(_T1 *) { new _T1; } |
| +struct D { |
| + template <typename _ForwardIterator, typename _Size> |
| + static _ForwardIterator __uninit_default_n(_ForwardIterator p1, _Size) { |
| + _Construct(p1); |
| + } |
| +}; |
| +template <typename _ForwardIterator, typename _Size> |
| +void __uninitialized_default_n(_ForwardIterator p1, _Size) { |
| + D::__uninit_default_n(p1, 0); |
| +} |
| +template <typename _ForwardIterator, typename _Size, typename _Tp> |
| +void __uninitialized_default_n_a(_ForwardIterator p1, _Size, _Tp) { |
| + __uninitialized_default_n(p1, 0); |
| +} |
| +template <typename> struct __shared_ptr { |
| + constexpr __shared_ptr() : _M_ptr(), _M_refcount() {} |
| + int _M_ptr; |
| + int _M_refcount; |
| +}; |
| +template <typename _Alloc> 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 <typename _Tp, typename _Alloc = B<_Tp>> 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<int> trigger[1]; |
| + }; |
| + __shared_ptr<int> resetTrigger_; |
| + K<I> states_; |
| + __shared_ptr<int> triggerManager_; |
| +}; |
| +__shared_ptr<int> a; |
| +H::H() : states_(0), triggerManager_(a) {} |