c++: Fix initlist-array12.C
authorMarek Polacek <polacek@redhat.com>
Thu, 28 May 2020 13:54:41 +0000 (09:54 -0400)
committerMarek Polacek <polacek@redhat.com>
Thu, 28 May 2020 15:20:57 +0000 (11:20 -0400)
* g++.dg/cpp0x/initlist-array12.C: Fix the definition of
initializer_list for ilp32 target.

gcc/testsuite/g++.dg/cpp0x/initlist-array12.C

index b012e72..168c5dd 100644 (file)
@@ -1,10 +1,12 @@
 // PR c++/95319
 // { dg-do compile { target c++11 } }
 
+typedef decltype(sizeof(char)) size_t;
+
 namespace std {
 template <class> class initializer_list {
   int *_M_array;
-  unsigned long _M_len;
+  size_t _M_len;
 };
 template <int _Nm> struct A { typedef int _Type[_Nm]; };
 template <int _Nm> struct B { typename A<_Nm>::_Type _M_elems; };