* g++.dg/debug/pr71432.C: Fail on AIX.
[official-gcc.git] / gcc / testsuite / g++.dg / debug / pr71432.C
blob14e5a38b5c1cc01dccff9829bac90f2c2319e674
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fcompare-debug" } */
3 /* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
5 namespace std
7   typedef long unsigned int size_t;
8   inline namespace __cxx11
9   {
10   } }
12 extern "C++"
14   namespace std
15   {
16     template < typename _Tp > struct __is_char
17     {
18     };
19     template <> struct __is_char <char >
20     {
21       enum
22         { __value = 1 };
23     };
24   } namespace __gnu_cxx
25   {
26     template < bool, typename > struct __enable_if
27     {
28     };
29     template < typename _Tp > struct __enable_if <true, _Tp >
30     {
31       typedef _Tp __type;
32     };
33   }
36 namespace __gnu_cxx
38   template < typename _Tp > class new_allocator
39   {
40   };
43 namespace std
45   template < typename _Tp > using __allocator_base =
46     __gnu_cxx::new_allocator < _Tp >;
47 template < typename _Tp > class allocator:public __allocator_base < _Tp >
48   {
49   };
50   template < typename _Alloc > struct allocator_traits
51   {
52   };
53   template < typename _Tp > struct allocator_traits <allocator < _Tp >>
54   {
55     using size_type = std::size_t;
56     template < typename _Up > using rebind_alloc = allocator < _Up >;
57   };
60 namespace __gnu_cxx
62   template < typename _Alloc > struct __alloc_traits:std::allocator_traits <_Alloc >
63   {
64     typedef std::allocator_traits < _Alloc > _Base_type;
65      template < typename _Tp > struct rebind
66     {
67       typedef typename _Base_type::template rebind_alloc < _Tp > other;
68      };
69    };
72 namespace std
74   template < class _CharT > struct char_traits;
75   namespace __cxx11
76   {
77     template < typename _CharT, typename _Traits =
78       char_traits < _CharT >, typename _Alloc =
79       allocator < _CharT > >class basic_string;
80     typedef basic_string < char >string;
81   }
84 namespace std
86   template <> struct char_traits <char >
87   {
88     typedef char char_type;
89      static int compare (const char_type * __s1, const char_type * __s2,
90                           size_t __n)
91     {
92       return __builtin_memcmp (__s1, __s2, __n);
93     }
94   };
96   namespace __cxx11
97   {
98     template < typename _CharT, typename _Traits, typename _Alloc >
99     class basic_string
100     {
101       typedef typename __gnu_cxx::__alloc_traits <_Alloc >::template rebind < _CharT >::other _Char_alloc_type;
102       typedef __gnu_cxx::__alloc_traits < _Char_alloc_type > _Alloc_traits;
103       typedef typename _Alloc_traits::size_type size_type;
105     public:
106       size_type size ()const noexcept
107       {
108       }
109       const _CharT *data () const noexcept
110       {
111       }
112     };
113   }
115   template < typename _CharT > inline typename __gnu_cxx::__enable_if <
116     __is_char < _CharT >::__value,
117     bool >::__type operator== (const basic_string < _CharT > &__lhs,
118                                const basic_string < _CharT > &__rhs) noexcept
119   {
120     return !std::char_traits < _CharT >::compare (__lhs.data (),
121                                                    __rhs.data (),
122                                                    __lhs.size ());
123   }
126 class CLIParameterType
128   const std::string & getSwitchOption (unsigned int i) const
129   {
130   } unsigned int getSwitchOptionCount () const
131   {
132   } int checkSwitched (const std::string & value) const;
136 CLIParameterType::checkSwitched (const std::string & value) const
138   int contains = false;
139   for (unsigned int i = 0; !contains && i < getSwitchOptionCount () ;)
140     contains = getSwitchOption (i) == value;