2 // { dg-options "-g -O0" }
4 // Copyright (C) 2014-2018 Free Software Foundation, Inc.
6 // This file is part of the GNU ISO C++ Library. This library is free
7 // software; you can redistribute it and/or modify it under the
8 // terms of the GNU General Public License as published by the
9 // Free Software Foundation; either version 3, or (at your option)
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
17 // You should have received a copy of the GNU General Public License along
18 // with this library; see the file COPYING3. If not see
19 // <http://www.gnu.org/licenses/>.
26 std::vector
<int> v0
, v1
;
27 std::vector
<bool> bv0
, bv1
, bv2
, bv3
;
33 for (int i
= 0; i
< 15; i
++)
34 bv1
.push_back (i
% 3);
36 for (int i
= 0; i
< 64; i
++)
37 bv2
.push_back (i
% 2);
39 for (int i
= 0; i
< 65; i
++)
40 bv3
.push_back (i
% 2);
42 // { dg-final { note-test v1\[0\] 1 } }
43 // { dg-final { note-test v1\[1\] 2 } }
44 // { dg-final { note-test v1\[2\] 3 } }
45 // { dg-final { note-test bv1\[0\] false } }
46 // { dg-final { note-test bv1\[1\] true } }
47 // { dg-final { note-test bv1\[14\] true } }
48 // { dg-final { note-test bv2\[0\] false } }
49 // { dg-final { note-test bv2\[1\] true } }
50 // { dg-final { note-test bv2\[63\] true } }
51 // { dg-final { note-test bv3\[0\] false } }
52 // { dg-final { note-test bv3\[1\] true } }
53 // { dg-final { note-test bv3\[63\] true } }
54 // { dg-final { note-test v0.size() 0 } }
55 // { dg-final { note-test bv0.size() 0 } }
56 // { dg-final { note-test v1.size() 3 } }
57 // { dg-final { note-test bv1.size() 15 } }
58 // { dg-final { note-test bv2.size() 64 } }
59 // { dg-final { note-test bv3.size() 65 } }
60 // { dg-final { note-test v0.empty() true } }
61 // { dg-final { note-test v1.empty() false } }
62 // { dg-final { note-test bv0.empty() true } }
63 // { dg-final { note-test bv1.empty() false } }
64 // { dg-final { note-test bv2.empty() false } }
65 // { dg-final { note-test bv3.empty() false } }
66 // { dg-final { note-test v1.front() 1 } }
67 // { dg-final { note-test v1.back() 3 } }
68 // { dg-final { note-test bv1.front() false } }
69 // { dg-final { note-test bv1.back() true } }
70 // { dg-final { note-test bv2.front() false } }
71 // { dg-final { note-test bv2.back() true } }
72 // { dg-final { note-test bv3.front() false } }
73 // { dg-final { note-test bv3.back() false } }
74 // { dg-final { note-test v1.at(1) 2 } }
75 // { dg-final { note-test bv1.at(0) false } }
76 // { dg-final { note-test bv1.at(1) true } }
77 // { dg-final { note-test bv1.at(14) true } }
78 // { dg-final { note-test bv2.at(0) false } }
79 // { dg-final { note-test bv2.at(1) true } }
80 // { dg-final { note-test bv2.at(63) true } }
81 // { dg-final { note-test bv3.at(0) false } }
82 // { dg-final { note-test bv3.at(1) true } }
83 // { dg-final { note-test bv3.at(63) true } }
84 // { dg-final { note-test bv3.at(64) false } }
86 // { dg-final { whatis-test v0.empty() bool } }
87 // { dg-final { whatis-test v0.size() std::size_t } }
88 // { dg-final { whatis-test v1.front() int } }
89 // { dg-final { whatis-test v1.back() int } }
90 // { dg-final { whatis-test v1\[0\] int } }
91 // { dg-final { whatis-test v1.at(1) int } }
92 // { dg-final { whatis-test bv0.empty() bool } }
93 // { dg-final { whatis-test bv0.size() std::size_t } }
94 // { dg-final { whatis-test bv1.front() bool } }
95 // { dg-final { whatis-test bv1.back() bool } }
96 // { dg-final { whatis-test bv1\[0\] bool } }
97 // { dg-final { whatis-test bv1.at(1) bool } }
99 return 0; // Mark SPOT
102 // { dg-final { gdb-test SPOT {} 1 } }