Debian Codegraph @

gcc/testsuite/g++.dg/ipa/pr78211.C

raw
1 // PR lto/78211
2 // { dg-do compile { target { lto && c++11 } } }
3 // { dg-options "-fcompare-debug -fno-printf-return-value -flto -fno-use-linker-plugin -O3 -Wno-return-type" }
4
5 namespace std {
6 typedef __SIZE_TYPE__ size_t;
7 inline namespace __cxx11 { }
8 template<typename...> using __void_t = void;
9 template<class _E>
10 class initializer_list {
11 typedef size_t size_type;
12 typedef const _E* iterator;
13 iterator _M_array;
14 size_type _M_len;
15 };
16 }
17 extern "C++" {
18 namespace std {
19 template<typename _Tp> struct __is_char { enum { __value = 1 }; };
20 }
21 namespace __gnu_cxx {
22 template<bool, typename> struct __enable_if { };
23 template<typename _Tp> struct __enable_if<true, _Tp> { typedef _Tp __type; };
24 }
25 }
26 namespace std {
27 template<typename _Iterator, typename = __void_t<>> struct __iterator_traits { };
28 template<typename _Iterator> struct iterator_traits : public __iterator_traits<_Iterator> { };
29 template<typename _Tp> struct iterator_traits<_Tp*> { typedef _Tp& reference; };
30 }
31 namespace __gnu_cxx {
32 using std::iterator_traits;
33 template<typename _Iterator, typename _Container> class __normal_iterator {
34 typedef iterator_traits<_Iterator> __traits_type;
35 public:
36 typedef typename __traits_type::reference reference;
37 reference operator*() const noexcept { }
38 };
39 template<typename _IteratorL, typename _IteratorR, typename _Container>
40 inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, const __normal_iterator<_IteratorR, _Container>& __rhs) noexcept { return true; }
41 }
42 namespace std {
43 template<typename _CharT> struct char_traits;
44 template<typename> class allocator;
45 template<typename _Alloc> struct allocator_traits { };
46 template<typename _Tp> struct allocator_traits<allocator<_Tp>> {
47 using const_pointer = const _Tp*;
48 template<typename _Up> using rebind_alloc = allocator<_Up>;
49 };
50 }
51 namespace __gnu_cxx {
52 template<typename _Alloc> struct __alloc_traits : std::allocator_traits<_Alloc> {
53 typedef std::allocator_traits<_Alloc> _Base_type;
54 template<typename _Tp> struct rebind {
55 typedef typename _Base_type::template rebind_alloc<_Tp> other;
56 };
57 };
58 }
59 namespace std {
60 namespace __cxx11 {
61 template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string;
62 typedef basic_string<char> string;
63 }
64 template<typename _CharT> inline typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, bool>::__type
65 operator==(const basic_string<_CharT>& __lhs, const basic_string<_CharT>& __rhs) noexcept { }
66 template<typename _Tp, typename _Alloc> struct _Vector_base {
67 typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type;
68 };
69 template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector {
70 typedef _Vector_base<_Tp, _Alloc> _Base;
71 typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
72 typedef __gnu_cxx::__alloc_traits<_Tp_alloc_type> _Alloc_traits;
73 public:
74 typedef typename _Alloc_traits::const_pointer const_pointer;
75 typedef __gnu_cxx::__normal_iterator<const_pointer, vector> const_iterator;
76 const_iterator end() const noexcept { }
77 };
78 }
79 class VwViewPlane;
80 class VwViewer {
81 std::vector<VwViewPlane*> mViewPlaneList;
82 VwViewPlane* FindViewPlane (const std::string& name);
83 const VwViewPlane* FindViewPlane (const std::string& name) const;
84 };
85 class VwAssimilatorStickyBox;
86 class VwViewer_2D final {
87 VwAssimilatorStickyBox* mp_stickyAssimilator;
88 void drawStickyBox();
89 void undrawStickyBox();
90 };
91 struct VwViewPlane {
92 const std::string& GetName() const { }
93 };
94 struct VwAssimilator_2D {
95 virtual int DrawNext() = 0;
96 };
97 class VwAssimilator_2D_Geometry : public VwAssimilator_2D { };
98 class VwAssimilatorStickyBox final : public VwAssimilator_2D_Geometry { };
99 VwViewPlane* VwViewer::FindViewPlane (const std::string& name) {
100 VwViewPlane* p_result = __null;
101 std::vector<VwViewPlane*>::const_iterator it;
102 while (it != mViewPlaneList.end()) {
103 if ((*it) -> GetName() == name ) break;
104 }
105 return p_result;
106 }
107 const VwViewPlane* VwViewer::FindViewPlane (const std::string& name) const {
108 VwViewPlane* p_result = __null;
109 std::vector<VwViewPlane*>::const_iterator it;
110 while (it != mViewPlaneList.end()) {
111 if ((*it) -> GetName() == name ) break;
112 }
113 return p_result;
114 }
115 void VwViewer_2D::drawStickyBox() {
116 mp_stickyAssimilator->DrawNext();
117 }
118 void VwViewer_2D::undrawStickyBox() {
119 mp_stickyAssimilator->DrawNext();
120 }