[ 0:01] compiling /home/xrockai/src/divine/nightly/test/libcxx/containers/input_iterator.pass.cpp [ 0:01] In file included from /home/xrockai/src/divine/nightly/test/libcxx/containers/input_iterator.pass.cpp:17: [ 0:01] In file included from /dios/libcxx/include/list:183: [ 0:01] In file included from /dios/libcxx/include/memory:652: [ 0:01] In file included from /dios/libcxx/include/type_traits:417: [ 0:01] In file included from /dios/libcxx/include/cstddef:44: [ 0:01] In file included from /dios/include/stddef.h:10: [ 0:01] In file included from /dios/include/_PDCLIB/int.h:16: [ 0:01] /dios/include/_PDCLIB/cdefs.h:69:10: warning: Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:01] #warning Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:01] ^ [ 0:01] 1 warning generated. [ 0:02] compiling /dios/lib/config/seqklee.bc [ 0:02] setting up pass: functionmeta, options = [ 0:04] setting up pass: fuse-ctors, options = [ 0:04] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.15/_klee_out" [ 0:08] KLEE: Using Z3 solver backend [ 0:08] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:08] warning: Linking two modules of different target triples: klee_div_zero_check.bc' is 'x86_64-unknown-linux-gnu' whereas 'klee.bc' is 'x86_64-unknown-none-elf' [ 0:08] [ 0:08] KLEE: WARNING: undefined reference to function: _Z10klee_abortv [ 0:13] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:13] KLEE: WARNING: undefined reference to function: klee_free [ 0:13] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:13] KLEE: WARNING ONCE: Using zero size array fix for landingpad instruction filter [ 0:13] i:1 [ 0:13] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:13] about to __boot:0 [ 0:13] about to run the scheduler:0 [ 0:13] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:13] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:13] KLEE: NOTE: now ignoring this error at this location [ 0:13] KLEE: ERROR: EXITING ON ERROR: [ 0:13] Error: failed external call: __dios_tainted_init [ 0:13] File: /dios/libc/sys/start.cpp [ 0:13] Line: 87 [ 0:13] assembly.ll line: 80357 [ 0:13] Stack: [ 0:13] #000080357 in __dios_start (l=2, argc=1, argv=94694601389576, envp=94694601475080) at /dios/libc/sys/start.cpp:87 [ 0:13] #100028041 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:13] #200089599 in klee_boot (argc=2, argv=94694565415936) at /dios/arch/klee/boot.c:41 [ 0:13] [ 0:13] [ 0:13] 1 /* TAGS: c++ fin */ [ 0:13] 2 /* CC_OPTS: -std=c++2a */ [ 0:13] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:13] 4 //===----------------------------------------------------------------------===// [ 0:13] 5 // [ 0:13] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:13] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:13] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:13] 9 // [ 0:13] 10 //===----------------------------------------------------------------------===// [ 0:13] 11 [ 0:13] 12 // [ 0:13] 13 [ 0:13] 14 // template [ 0:13] 15 // list(InputIterator first, InputIterator last, const Allocator& = Allocator()); [ 0:13] 16 [ 0:13] 17 #include [ 0:13] 18 #include [ 0:13] 19 #include "test_macros.h" [ 0:13] 20 #include "test_iterators.h" [ 0:13] 21 #include "test_allocator.h" [ 0:13] 22 #include "min_allocator.h" [ 0:13] 23 #if TEST_STD_VER >= 11 [ 0:13] 24 #include "emplace_constructible.h" [ 0:13] 25 #include "container_test_types.h" [ 0:13] 26 #endif [ 0:13] 27 [ 0:13] 28 void basic_test() [ 0:13] 29 { [ 0:13] 30 { [ 0:13] 31 int a[] = {0, 1, 2, 3}; [ 0:13] 32 std::list l(input_iterator(a), [ 0:13] 33 input_iterator(a + sizeof(a)/sizeof(a[0]))); [ 0:13] 34 assert(l.size() == sizeof(a)/sizeof(a[0])); [ 0:13] 35 assert(std::distance(l.begin(), l.end()) == sizeof(a)/sizeof(a[0])); [ 0:13] 36 int j = 0; [ 0:13] 37 for (std::list::const_iterator i = l.begin(), e = l.end(); i != e; ++i, ++j) [ 0:13] 38 assert(*i == j); [ 0:13] 39 } [ 0:13] 40 { [ 0:13] 41 int a[] = {0, 1, 2, 3}; [ 0:13] 42 std::list l(input_iterator(a), [ 0:13] 43 input_iterator(a + sizeof(a)/sizeof(a[0])), [ 0:13] 44 std::allocator()); [ 0:13] 45 assert(l.size() == sizeof(a)/sizeof(a[0])); [ 0:13] 46 assert(std::distance(l.begin(), l.end()) == sizeof(a)/sizeof(a[0])); [ 0:13] 47 int j = 0; [ 0:13] 48 for (std::list::const_iterator i = l.begin(), e = l.end(); i != e; ++i, ++j) [ 0:13] 49 assert(*i == j); [ 0:13] 50 } [ 0:13] 51 { [ 0:13] 52 int a[] = {0, 1, 2, 3}; [ 0:13] 53 // Add 2 for implementations that dynamically allocate a sentinel node and container proxy. [ 0:13] 54 std::list > l(input_iterator(a), [ 0:13] 55 input_iterator(a + sizeof(a)/sizeof(a[0]))); [ 0:13] 56 assert(l.size() == sizeof(a)/sizeof(a[0])); [ 0:13] 57 assert(std::distance(l.begin(), l.end()) == sizeof(a)/sizeof(a[0])); [ 0:13] 58 int j = 0; [ 0:13] 59 for (std::list::const_iterator i = l.begin(), e = l.end(); i != e; ++i, ++j) [ 0:13] 60 assert(*i == j); [ 0:13] 61 } [ 0:13] 62 #if TEST_STD_VER >= 11 [ 0:13] 63 { [ 0:13] 64 int a[] = {0, 1, 2, 3}; [ 0:13] 65 std::list> l(input_iterator(a), [ 0:13] 66 input_iterator(a + sizeof(a)/sizeof(a[0]))); [ 0:13] 67 assert(l.size() == sizeof(a)/sizeof(a[0])); [ 0:13] 68 assert(std::distance(l.begin(), l.end()) == sizeof(a)/sizeof(a[0])); [ 0:13] 69 int j = 0; [ 0:13] 70 for (std::list>::const_iterator i = l.begin(), e = l.end(); i != e; ++i, ++j) [ 0:13] 71 assert(*i == j); [ 0:13] 72 } [ 0:13] 73 { [ 0:13] 74 int a[] = {0, 1, 2, 3}; [ 0:13] 75 std::list> l(input_iterator(a), [ 0:13] 76 input_iterator(a + sizeof(a)/sizeof(a[0])), [ 0:13] 77 min_allocator()); [ 0:13] 78 assert(l.size() == sizeof(a)/sizeof(a[0])); [ 0:13] 79 assert(std::distance(l.begin(), l.end()) == sizeof(a)/sizeof(a[0])); [ 0:13] 80 int j = 0; [ 0:13] 81 for (std::list>::const_iterator i = l.begin(), e = l.end(); i != e; ++i, ++j) [ 0:13] 82 assert(*i == j); [ 0:13] 83 } [ 0:13] 84 #endif [ 0:13] 85 } [ 0:13] 86 [ 0:13] 87 [ 0:13] 88 [ 0:13] 89 void test_emplacable_concept() { [ 0:13] 90 #if TEST_STD_VER >= 11 [ 0:13] 91 int arr1[] = {42}; [ 0:13] 92 int arr2[] = {1, 101, 42}; [ 0:13] 93 { [ 0:13] 94 using T = EmplaceConstructible; [ 0:13] 95 using It = random_access_iterator; [ 0:13] 96 { [ 0:13] 97 std::list v(It(arr1), It(std::end(arr1))); [ 0:13] 98 auto I = v.begin(); [ 0:13] 99 assert(I->value == 42); [ 0:13] 100 } [ 0:13] 101 { [ 0:13] 102 std::list v(It(arr2), It(std::end(arr2))); [ 0:13] 103 auto I = v.begin(); [ 0:13] 104 assert(I->value == 1); [ 0:13] 105 ++I; [ 0:13] 106 assert(I->value == 101); [ 0:13] 107 ++I; [ 0:13] 108 assert(I->value == 42); [ 0:13] 109 } [ 0:13] 110 } [ 0:13] 111 { [ 0:13] 112 using T = EmplaceConstructible; [ 0:13] 113 using It = input_iterator; [ 0:13] 114 { [ 0:13] 115 std::list v(It(arr1), It(std::end(arr1))); [ 0:13] 116 auto I = v.begin(); [ 0:13] 117 assert(I->value == 42); [ 0:13] 118 } [ 0:13] 119 { [ 0:13] 120 std::list v(It(arr2), It(std::end(arr2))); [ 0:13] 121 auto I = v.begin(); [ 0:13] 122 //assert(v[0].copied == 0); [ 0:13] 123 assert(I->value == 1); [ 0:13] 124 //assert(v[1].copied == 0); [ 0:13] 125 ++I; [ 0:13] 126 assert(I->value == 101); [ 0:13] 127 ++I; [ 0:13] 128 assert(I->value == 42); [ 0:13] 129 } [ 0:13] 130 } [ 0:13] 131 #endif [ 0:13] 132 } [ 0:13] 133 [ 0:13] 134 [ 0:13] 135 [ 0:13] 136 void test_emplacable_concept_with_alloc() { [ 0:13] 137 #if TEST_STD_VER >= 11 [ 0:13] 138 int arr1[] = {42}; [ 0:13] 139 int arr2[] = {1, 101, 42}; [ 0:13] 140 { [ 0:13] 141 using T = EmplaceConstructible; [ 0:13] 142 using It = random_access_iterator; [ 0:13] 143 std::allocator a; [ 0:13] 144 { [ 0:13] 145 std::list v(It(arr1), It(std::end(arr1)), a); [ 0:13] 146 auto I = v.begin(); [ 0:13] 147 assert(I->value == 42); [ 0:13] 148 } [ 0:13] 149 { [ 0:13] 150 std::list v(It(arr2), It(std::end(arr2)), a); [ 0:13] 151 auto I = v.begin(); [ 0:13] 152 assert(I->value == 1); [ 0:13] 153 ++I; [ 0:13] 154 assert(I->value == 101); [ 0:13] 155 ++I; [ 0:13] 156 assert(I->value == 42); [ 0:13] 157 } [ 0:13] 158 } [ 0:13] 159 { [ 0:13] 160 using T = EmplaceConstructible; [ 0:13] 161 using It = input_iterator; [ 0:13] 162 std::allocator a; [ 0:13] 163 { [ 0:13] 164 std::list v(It(arr1), It(std::end(arr1)), a); [ 0:13] 165 auto I = v.begin(); [ 0:13] 166 assert(I->value == 42); [ 0:13] 167 } [ 0:13] 168 { [ 0:13] 169 std::list v(It(arr2), It(std::end(arr2)), a); [ 0:13] 170 auto I = v.begin(); [ 0:13] 171 //assert(v[0].copied == 0); [ 0:13] 172 assert(I->value == 1); [ 0:13] 173 //assert(v[1].copied == 0); [ 0:13] 174 ++I; [ 0:13] 175 assert(I->value == 101); [ 0:13] 176 ++I; [ 0:13] 177 assert(I->value == 42); [ 0:13] 178 } [ 0:13] 179 } [ 0:13] 180 #endif [ 0:13] 181 } [ 0:13] 182 [ 0:13] 183 void test_ctor_under_alloc() { [ 0:13] 184 #if TEST_STD_VER >= 11 [ 0:13] 185 int arr1[] = {42}; [ 0:13] 186 int arr2[] = {1, 101, 42}; [ 0:13] 187 { [ 0:13] 188 using C = TCT::list<>; [ 0:13] 189 using It = forward_iterator; [ 0:13] 190 { [ 0:13] 191 ExpectConstructGuard G(1); [ 0:13] 192 C v(It(arr1), It(std::end(arr1))); [ 0:13] 193 } [ 0:13] 194 { [ 0:13] 195 ExpectConstructGuard G(3); [ 0:13] 196 C v(It(arr2), It(std::end(arr2))); [ 0:13] 197 } [ 0:13] 198 } [ 0:13] 199 { [ 0:13] 200 using C = TCT::list<>; [ 0:13] 201 using It = input_iterator; [ 0:13] 202 { [ 0:13] 203 ExpectConstructGuard G(1); [ 0:13] 204 C v(It(arr1), It(std::end(arr1))); [ 0:13] 205 } [ 0:13] 206 { [ 0:13] 207 ExpectConstructGuard G(3); [ 0:13] 208 C v(It(arr2), It(std::end(arr2))); [ 0:13] 209 } [ 0:13] 210 } [ 0:13] 211 #endif [ 0:13] 212 } [ 0:13] 213 [ 0:13] 214 void test_ctor_under_alloc_with_alloc() { [ 0:13] 215 #if TEST_STD_VER >= 11 [ 0:13] 216 int arr1[] = {42}; [ 0:13] 217 int arr2[] = {1, 101, 42}; [ 0:13] 218 { [ 0:13] 219 using C = TCT::list<>; [ 0:13] 220 using It = forward_iterator; [ 0:13] 221 using Alloc = typename C::allocator_type; [ 0:13] 222 Alloc a; [ 0:13] 223 { [ 0:13] 224 ExpectConstructGuard G(1); [ 0:13] 225 C v(It(arr1), It(std::end(arr1)), a); [ 0:13] 226 } [ 0:13] 227 { [ 0:13] 228 ExpectConstructGuard G(3); [ 0:13] 229 C v(It(arr2), It(std::end(arr2)), a); [ 0:13] 230 } [ 0:13] 231 } [ 0:13] 232 { [ 0:13] 233 using C = TCT::list<>; [ 0:13] 234 using It = input_iterator; [ 0:13] 235 using Alloc = typename C::allocator_type; [ 0:13] 236 Alloc a; [ 0:13] 237 { [ 0:13] 238 ExpectConstructGuard G(1); [ 0:13] 239 C v(It(arr1), It(std::end(arr1)), a); [ 0:13] 240 } [ 0:13] 241 { [ 0:13] 242 ExpectConstructGuard G(3); [ 0:13] 243 C v(It(arr2), It(std::end(arr2)), a); [ 0:13] 244 } [ 0:13] 245 } [ 0:13] 246 #endif [ 0:13] 247 } [ 0:13] 248 [ 0:13] 249 [ 0:13] 250 [ 0:13] 251 int main(int, char**) { [ 0:13] 252 basic_test(); [ 0:13] 253 test_emplacable_concept(); [ 0:13] 254 test_emplacable_concept_with_alloc(); [ 0:13] 255 test_ctor_under_alloc(); [ 0:13] 256 test_ctor_under_alloc_with_alloc(); [ 0:13] 257 [ 0:13] 258 return 0; [ 0:13] 259 } [ 0:13] # no errors were expected but one was found anyway