OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [torture/] [20070621-1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* Reduced from libstdc++-v3/testsuite/25_algorithms/equal/1.cc
2
 
3
1.2.ii: In function 'void test1()':
4
1.2.ii:104: error: true/false edge after a non-COND_EXPR in bb 15
5
1.2.ii:104: internal compiler error: verify_flow_info failed
6
 
7
*/
8
 
9
__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;
10
namespace std __attribute__ ((__visibility__ ("default"))) {
11
    template     struct __are_same     {
12
        enum {
13
  __value = 0 };
14
      };
15
    template     struct __is_integer     {
16
        enum {
17
  __value = 0 };
18
      };
19
    template     struct __is_pointer     {
20
        enum {
21
  __value = 0 };
22
      };
23
    template     struct __is_normal_iterator     {
24
        enum {
25
  __value = 0 };
26
      };
27
    struct input_iterator_tag {
28
 };
29
    template     struct iterator     {
30
        typedef _Tp value_type;
31
      };
32
    template     struct iterator_traits     {
33
        typedef typename _Iterator::value_type value_type;
34
      };
35
    template::__value>     struct __niter_base     {
36
        static const _Iterator&       __b(const _Iterator& __it)       {
37
  return __it;
38
  }
39
      };
40
    template     struct __equal     {
41
        template         static bool         equal(_II1 __first1, _II1 __last1, _II2 __first2)         {
42
     for (;
43
  __first1 != __last1;
44
  ++__first1, ++__first2)      if (!(*__first1 == *__first2))        return false;
45
   }
46
      };
47
    template     inline bool     __equal_aux(_II1 __first1, _II1 __last1, _II2 __first2)     {
48
        typedef typename iterator_traits<_II1>::value_type _ValueType1;
49
        typedef typename iterator_traits<_II2>::value_type _ValueType2;
50
        const bool __simple = (__is_integer<_ValueType1>::__value                       && __is_pointer<_II1>::__value                       && __is_pointer<_II2>::__value         && __are_same<_ValueType1, _ValueType2>::__value);
51
        return std::__equal<__simple>::equal(__first1, __last1, __first2);
52
      }
53
    template     inline bool     equal(_II1 __first1, _II1 __last1, _II2 __first2)     {
54
        return std::__equal_aux(__niter_base<_II1>::__b(__first1),          __niter_base<_II1>::__b(__last1),          __niter_base<_II2>::__b(__first2));
55
      }
56
  }
57
extern "C" {
58
  extern void __assert_fail (__const char *__assertion, __const char *__file,       unsigned int __line, __const char *__function)      throw () __attribute__ ((__noreturn__));
59
  }
60
namespace __gnu_test {
61
    template     struct BoundsContainer     {
62
        T* first;
63
        T* last;
64
        BoundsContainer(T* _first, T* _last)  : first(_first), last(_last)       {
65
  }
66
      };
67
    template   class input_iterator_wrapper:public std::iterator      {
68
    public:
69
      typedef BoundsContainer ContainerType;
70
      T* ptr;
71
      ContainerType* SharedInfo;
72
      input_iterator_wrapper(T* _ptr, ContainerType* SharedInfo_in)       : ptr(_ptr), SharedInfo(SharedInfo_in)     {
73
  }
74
      bool     operator==(const input_iterator_wrapper& in) const     {
75
        (static_cast (__builtin_expect (!!(SharedInfo != __null && SharedInfo == in.SharedInfo), 1) ? 0 : (__assert_fail ("SharedInfo != __null && SharedInfo == in.SharedInfo", "/abuild/rguenther/gcc/libstdc++-v3/testsuite/util/testsuite_iterators.h", 201, __PRETTY_FUNCTION__), 0)));
76
        (static_cast (__builtin_expect (!!(ptr>=SharedInfo->first && in.ptr>=SharedInfo->first), 1) ? 0 : (__assert_fail ("ptr>=SharedInfo->first && in.ptr>=SharedInfo->first", "/abuild/rguenther/gcc/libstdc++-v3/testsuite/util/testsuite_iterators.h", 202, __PRETTY_FUNCTION__), 0)));
77
      }
78
      bool     operator!=(const input_iterator_wrapper& in) const     {
79
        return !(*this == in);
80
      }
81
      T&     operator*() const     {
82
        (static_cast (__builtin_expect (!!(SharedInfo && ptr < SharedInfo->last), 1) ? 0 : (__assert_fail ("SharedInfo && ptr < SharedInfo->last", "/abuild/rguenther/gcc/libstdc++-v3/testsuite/util/testsuite_iterators.h", 215, __PRETTY_FUNCTION__), 0)));
83
        (static_cast (__builtin_expect (!!(ptr >= SharedInfo->first), 1) ? 0 : (__assert_fail ("ptr >= SharedInfo->first", "/abuild/rguenther/gcc/libstdc++-v3/testsuite/util/testsuite_iterators.h", 216, __PRETTY_FUNCTION__), 0)));
84
      }
85
      input_iterator_wrapper&     operator++()     {
86
        (static_cast (__builtin_expect (!!(SharedInfo && ptr < SharedInfo->last), 1) ? 0 : (__assert_fail ("SharedInfo && ptr < SharedInfo->last", "/abuild/rguenther/gcc/libstdc++-v3/testsuite/util/testsuite_iterators.h", 237, __PRETTY_FUNCTION__), 0)));
87
        ptr++;
88
        SharedInfo->first=ptr;
89
      }
90
    };
91
    template  class ItType>   struct test_container   {
92
      typename ItType::ContainerType bounds;
93
      test_container(T* _first, T* _last):bounds(_first, _last)     {
94
  }
95
      ItType     it(T* pos)     {
96
        return ItType(pos, &bounds);
97
      }
98
      ItType     begin()     {
99
  return it(bounds.first);
100
  }
101
      ItType     end()     {
102
  }
103
     };
104
  }
105
using __gnu_test::test_container;
106
using __gnu_test::input_iterator_wrapper;
107
typedef test_container Container;
108
int array1[] = {
109
 0, 1};
110
int array2[] = {
111
 1, 0};
112
void test1() {
113
    Container con1(array1, array1);
114
    Container con2(array2, array2);
115
    (static_cast (__builtin_expect (!!(std::equal(con1.begin(), con1.end(), con2.begin())), 1) ? 0 : (__assert_fail ("std::equal(con1.begin(), con1.end(), con2.begin())", "/abuild/rguenther/gcc/libstdc++-v3/testsuite/25_algorithms/equal/1.cc", 35, __PRETTY_FUNCTION__), 0)));
116
  }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.