[pushed] c++: testsuite: fix cpp0x/initlist135.C portability

Patrick Palka <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
The inline definition of std::initializer_list in this testcase is not
what the compiler expects on i686 due to over-reduction of the original
testcase.  Better to just include <initializer_list> instead.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/initlist135.C: Include <initializer_list> and
	remove the inline definition of std::initializer_list.
---
 gcc/testsuite/g++.dg/cpp0x/initlist135.C | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist135.C b/gcc/testsuite/g++.dg/cpp0x/initlist135.C
index 759ff6833a2e..8dda882f8d5d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist135.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist135.C
@@ -1,14 +1,9 @@
 // PR c++/126472
 // { dg-do run { target c++11 } }
 
+#include <initializer_list>
+
 namespace std {
-template <class _E> struct initializer_list {
-  typedef const _E *const_iterator;
-  const _E *_M_array;
-  unsigned long _M_len;
-  const_iterator begin() const { return _M_array; }
-  const_iterator end() const { return begin() + _M_len; }
-};
 struct _Optional_payload_base {
   struct _Storage {
     constexpr _Storage() : _M_empty() {}
-- 
2.55.0.618.g1a3e64c6c4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.