diff options
author | Khem Raj <raj.khem@gmail.com> | 2011-04-30 12:37:47 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-05-05 11:54:44 +0100 |
commit | b0d5b9f12adbce2c4a0df6059f5671188cd32293 (patch) | |
tree | f376fcd2e5dcc46185d73d619ce2eec31320d812 /meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch | |
parent | 81859b136c0153e8d5be71d56e910dcc3e8cdb66 (diff) | |
download | openembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.tar.gz openembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.tar.bz2 openembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.tar.xz openembedded-core-b0d5b9f12adbce2c4a0df6059f5671188cd32293.zip |
gcc-4.6.0: Backport FSF 4.6 branch patches
This is set of bugfixes that has been done on
FSF gcc-4_2-branch since 4.6.0 was released
They will roll into 4.6.1 release once that
happens in coming approx 6 months time then
we can simply remove them thats the reason
so use a separate .inc file to define the
SRC_URI additions
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch new file mode 100644 index 000000000..4cdbd72b4 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.6.0/gcc-4_6-branch-backports/0199-2011-04-29-Paolo-Carlini-paolo.carlini-oracle.com.patch @@ -0,0 +1,137 @@ +From 838560450136f202dc9170f2ad3eec80b41e0381 Mon Sep 17 00:00:00 2001 +From: paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Fri, 29 Apr 2011 23:19:59 +0000 +Subject: [PATCH 199/200] 2011-04-29 Paolo Carlini <paolo.carlini@oracle.com> + + PR libstdc++/48760 + * include/std/complex (complex<float>::complex(float, float), + complex<double>::complex(double, double), + complex<long double>::complex(long double, long double)): Initialize + in the body in C++03 mode (no fix in C++0x mode). + * testsuite/26_numerics/complex/cons/48760.cc: New. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@173195 138bc75d-0d04-0410-961f-82ee72b054a4 + +index d36eddc..aa6e81d 100644 +--- a/libstdc++-v3/include/std/complex ++++ b/libstdc++-v3/include/std/complex +@@ -1046,7 +1046,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + _GLIBCXX_CONSTEXPR complex(_ComplexT __z) : _M_value(__z) { } + + _GLIBCXX_CONSTEXPR complex(float __r = 0.0f, float __i = 0.0f) ++#ifdef __GXX_EXPERIMENTAL_CXX0X__ ++ // The list-initialization extension to __complex__ types is ++ // not available in GCC 4.6. Thus libstdc++/48760 cannot be ++ // fixed in C++0x mode, unfortunately. + : _M_value(__r + __i * 1.0fi) { } ++#else ++ { ++ __real__ _M_value = __r; ++ __imag__ _M_value = __i; ++ } ++#endif + + explicit _GLIBCXX_CONSTEXPR complex(const complex<double>&); + explicit _GLIBCXX_CONSTEXPR complex(const complex<long double>&); +@@ -1186,7 +1196,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + _GLIBCXX_CONSTEXPR complex(_ComplexT __z) : _M_value(__z) { } + + _GLIBCXX_CONSTEXPR complex(double __r = 0.0, double __i = 0.0) ++#ifdef __GXX_EXPERIMENTAL_CXX0X__ ++ // The list-initialization extension to __complex__ types is ++ // not available in GCC 4.6. Thus libstdc++/48760 cannot be ++ // fixed in C++0x mode, unfortunately. + : _M_value(__r + __i * 1.0i) { } ++#else ++ { ++ __real__ _M_value = __r; ++ __imag__ _M_value = __i; ++ } ++#endif + + _GLIBCXX_CONSTEXPR complex(const complex<float>& __z) + : _M_value(__z.__rep()) { } +@@ -1328,7 +1348,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION + + _GLIBCXX_CONSTEXPR complex(long double __r = 0.0L, + long double __i = 0.0L) ++#ifdef __GXX_EXPERIMENTAL_CXX0X__ ++ // The list-initialization extension to __complex__ types is ++ // not available in GCC 4.6. Thus libstdc++/48760 cannot be ++ // fixed in C++0x mode, unfortunately. + : _M_value(__r + __i * 1.0Li) { } ++#else ++ { ++ __real__ _M_value = __r; ++ __imag__ _M_value = __i; ++ } ++#endif + + _GLIBCXX_CONSTEXPR complex(const complex<float>& __z) + : _M_value(__z.__rep()) { } +diff --git a/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc +new file mode 100644 +index 0000000..0201cc7 +--- /dev/null ++++ b/libstdc++-v3/testsuite/26_numerics/complex/cons/48760.cc +@@ -0,0 +1,56 @@ ++// Copyright (C) 2011 Free Software Foundation, Inc. ++// ++// This file is part of the GNU ISO C++ Library. This library is free ++// software; you can redistribute it and/or modify it under the ++// terms of the GNU General Public License as published by the ++// Free Software Foundation; either version 3, or (at your option) ++// any later version. ++ ++// This library is distributed in the hope that it will be useful, ++// but WITHOUT ANY WARRANTY; without even the implied warranty of ++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++// GNU General Public License for more details. ++ ++// You should have received a copy of the GNU General Public License along ++// with this library; see the file COPYING3. If not see ++// <http://www.gnu.org/licenses/>. ++ ++#include <complex> ++#include <limits> ++#include <testsuite_hooks.h> ++ ++template<typename T> ++ void do_test01() ++ { ++ bool test __attribute__((unused)) = true; ++ ++ if (std::numeric_limits<T>::has_quiet_NaN) ++ { ++ std::complex<T> c1(T(0), std::numeric_limits<T>::quiet_NaN()); ++ VERIFY( c1.real() == T(0) ); ++ VERIFY( std::isnan(c1.imag()) ); ++ ++ std::complex<T> c2(std::numeric_limits<T>::quiet_NaN(), T(0)); ++ VERIFY( std::isnan(c2.real()) ); ++ VERIFY( c2.imag() == T(0) ); ++ ++ std::complex<T> c3(std::numeric_limits<T>::quiet_NaN(), ++ std::numeric_limits<T>::quiet_NaN()); ++ VERIFY( std::isnan(c3.real()) ); ++ VERIFY( std::isnan(c3.imag()) ); ++ } ++ } ++ ++// libstdc++/48760 ++void test01() ++{ ++ do_test01<float>(); ++ do_test01<double>(); ++ do_test01<long double>(); ++} ++ ++int main() ++{ ++ test01(); ++ return 0; ++} +-- +1.7.0.4 + |