[ 0:00] compiling /home/xrockai/src/divine/nightly/test/libcxx/algorithms/set_intersection_comp.pass.cpp [ 0:00] In file included from /home/xrockai/src/divine/nightly/test/libcxx/algorithms/set_intersection_comp.pass.cpp:24: [ 0:00] In file included from /dios/libcxx/include/algorithm:639: [ 0:00] In file included from /dios/libcxx/include/initializer_list:46: [ 0:00] In file included from /dios/libcxx/include/cstddef:44: [ 0:00] In file included from /dios/include/stddef.h:10: [ 0:00] In file included from /dios/include/_PDCLIB/int.h:16: [ 0:00] /dios/include/_PDCLIB/cdefs.h:69:10: warning: Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:00] #warning Unsupported _ _cplusplus (__cplusplus) (too new) (supported: ISO/IEC 14882:1997, ISO/IEC 14882:2011). [ 0:00] ^ [ 0:00] 1 warning generated. [ 0:01] compiling /dios/lib/config/seqklee.bc [ 0:01] setting up pass: functionmeta, options = [ 0:02] setting up pass: fuse-ctors, options = [ 0:02] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.4/_klee_out" [ 0:06] KLEE: Using Z3 solver backend [ 0:06] WARNING: this target does not support the llvm.stacksave intrinsic. [ 0:06] 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:06] [ 0:06] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:10] KLEE: WARNING: undefined reference to function: klee_free [ 0:10] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:10] i:1 [ 0:10] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:10] about to __boot:0 [ 0:10] about to run the scheduler:0 [ 0:10] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:10] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:10] KLEE: NOTE: now ignoring this error at this location [ 0:10] KLEE: ERROR: EXITING ON ERROR: [ 0:10] Error: failed external call: __dios_tainted_init [ 0:10] File: /dios/libc/sys/start.cpp [ 0:10] Line: 87 [ 0:10] assembly.ll line: 94701 [ 0:10] Stack: [ 0:10] #000094701 in __dios_start (l=2, argc=1, argv=94265965392392, envp=94265965461512) at /dios/libc/sys/start.cpp:87 [ 0:10] #100070710 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:10] #200102949 in klee_boot (argc=2, argv=94265917414144) at /dios/arch/klee/boot.c:41 [ 0:10] [ 0:10] [ 0:10] 1 /* TAGS: c++ fin */ [ 0:10] 2 /* CC_OPTS: -std=c++2a */ [ 0:10] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:10] 4 //===----------------------------------------------------------------------===// [ 0:10] 5 // [ 0:10] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:10] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:10] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:10] 9 // [ 0:10] 10 //===----------------------------------------------------------------------===// [ 0:10] 11 [ 0:10] 12 // [ 0:10] 13 [ 0:10] 14 // template [ 0:10] 16 // requires OutputIterator [ 0:10] 17 // && OutputIterator [ 0:10] 18 // && Predicate [ 0:10] 19 // && Predicate [ 0:10] 20 // constpexr OutIter // constexpr after C++17 [ 0:10] 21 // set_intersection(InIter1 first1, InIter1 last1, InIter2 first2, InIter2 last2, [ 0:10] 22 // OutIter result, Compare comp); [ 0:10] 23 [ 0:10] 24 #include [ 0:10] 25 #include [ 0:10] 26 #include [ 0:10] 27 [ 0:10] 28 #include "test_macros.h" [ 0:10] 29 #include "test_iterators.h" [ 0:10] 30 [ 0:10] 31 #if TEST_STD_VER > 17 [ 0:10] 32 TEST_CONSTEXPR bool test_constexpr() { [ 0:10] 33 const int ia[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4}; [ 0:10] 34 const int ib[] = {2, 4, 4, 6}; [ 0:10] 35 int results[std::size(ia)] = {0}; [ 0:10] 36 [ 0:10] 37 auto comp = [](int a, int b) {return a < b; }; [ 0:10] 38 auto it = std::set_intersection(std::begin(ia), std::end(ia), [ 0:10] 39 std::begin(ib), std::end(ib), std::begin(results), comp); [ 0:10] 40 [ 0:10] 41 return std::includes(std::begin(ia), std::end(ia), std::begin(results), it) [ 0:10] 42 && std::includes(std::begin(ib), std::end(ib), std::begin(results), it) [ 0:10] 43 && std::is_sorted(std::begin(results), it, comp) [ 0:10] 44 && std::all_of(it, std::end(results), [](int a) {return a == 0; }) [ 0:10] 45 ; [ 0:10] 46 } [ 0:10] 47 #endif [ 0:10] 48 [ 0:10] 49 [ 0:10] 50 template [ 0:10] 51 void [ 0:10] 52 test() [ 0:10] 53 { [ 0:10] 54 int ia[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4}; [ 0:10] 55 const int sa = sizeof(ia)/sizeof(ia[0]); [ 0:10] 56 int ib[] = {2, 4, 4, 6}; [ 0:10] 57 const int sb = sizeof(ib)/sizeof(ib[0]); [ 0:10] 58 int ic[20]; [ 0:10] 59 int ir[] = {2, 4, 4}; [ 0:10] 60 const int sr = sizeof(ir)/sizeof(ir[0]); [ 0:10] 61 OutIter ce = std::set_intersection(Iter1(ia), Iter1(ia+sa), [ 0:10] 62 Iter2(ib), Iter2(ib+sb), OutIter(ic), std::less()); [ 0:10] 63 assert(base(ce) - ic == sr); [ 0:10] 64 assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); [ 0:10] 65 ce = std::set_intersection(Iter1(ib), Iter1(ib+sb), [ 0:10] 66 Iter2(ia), Iter2(ia+sa), OutIter(ic), std::less()); [ 0:10] 67 assert(base(ce) - ic == sr); [ 0:10] 68 assert(std::lexicographical_compare(ic, base(ce), ir, ir+sr) == 0); [ 0:10] 69 } [ 0:10] 70 [ 0:10] 71 int main(int, char**) [ 0:10] 72 { [ 0:10] 73 test, input_iterator, output_iterator >(); [ 0:10] 74 test, input_iterator, forward_iterator >(); [ 0:10] 75 test, input_iterator, bidirectional_iterator >(); [ 0:10] 76 test, input_iterator, random_access_iterator >(); [ 0:10] 77 test, input_iterator, int*>(); [ 0:10] 78 [ 0:10] 79 test, forward_iterator, output_iterator >(); [ 0:10] 80 test, forward_iterator, forward_iterator >(); [ 0:10] 81 test, forward_iterator, bidirectional_iterator >(); [ 0:10] 82 test, forward_iterator, random_access_iterator >(); [ 0:10] 83 test, forward_iterator, int*>(); [ 0:10] 84 [ 0:10] 85 test, bidirectional_iterator, output_iterator >(); [ 0:10] 86 test, bidirectional_iterator, forward_iterator >(); [ 0:10] 87 test, bidirectional_iterator, bidirectional_iterator >(); [ 0:10] 88 test, bidirectional_iterator, random_access_iterator >(); [ 0:10] 89 test, bidirectional_iterator, int*>(); [ 0:10] 90 [ 0:10] 91 test, random_access_iterator, output_iterator >(); [ 0:10] 92 test, random_access_iterator, forward_iterator >(); [ 0:10] 93 test, random_access_iterator, bidirectional_iterator >(); [ 0:10] 94 test, random_access_iterator, random_access_iterator >(); [ 0:10] 95 test, random_access_iterator, int*>(); [ 0:10] 96 [ 0:10] 97 test, const int*, output_iterator >(); [ 0:10] 98 test, const int*, forward_iterator >(); [ 0:10] 99 test, const int*, bidirectional_iterator >(); [ 0:10] 100 test, const int*, random_access_iterator >(); [ 0:10] 101 test, const int*, int*>(); [ 0:10] 102 [ 0:10] 103 test, input_iterator, output_iterator >(); [ 0:10] 104 test, input_iterator, forward_iterator >(); [ 0:10] 105 test, input_iterator, bidirectional_iterator >(); [ 0:10] 106 test, input_iterator, random_access_iterator >(); [ 0:10] 107 test, input_iterator, int*>(); [ 0:10] 108 [ 0:10] 109 test, forward_iterator, output_iterator >(); [ 0:10] 110 test, forward_iterator, forward_iterator >(); [ 0:10] 111 test, forward_iterator, bidirectional_iterator >(); [ 0:10] 112 test, forward_iterator, random_access_iterator >(); [ 0:10] 113 test, forward_iterator, int*>(); [ 0:10] 114 [ 0:10] 115 test, bidirectional_iterator, output_iterator >(); [ 0:10] 116 test, bidirectional_iterator, forward_iterator >(); [ 0:10] 117 test, bidirectional_iterator, bidirectional_iterator >(); [ 0:10] 118 test, bidirectional_iterator, random_access_iterator >(); [ 0:10] 119 test, bidirectional_iterator, int*>(); [ 0:10] 120 [ 0:10] 121 test, random_access_iterator, output_iterator >(); [ 0:10] 122 test, random_access_iterator, forward_iterator >(); [ 0:10] 123 test, random_access_iterator, bidirectional_iterator >(); [ 0:10] 124 test, random_access_iterator, random_access_iterator >(); [ 0:10] 125 test, random_access_iterator, int*>(); [ 0:10] 126 [ 0:10] 127 test, const int*, output_iterator >(); [ 0:10] 128 test, const int*, forward_iterator >(); [ 0:10] 129 test, const int*, bidirectional_iterator >(); [ 0:10] 130 test, const int*, random_access_iterator >(); [ 0:10] 131 test, const int*, int*>(); [ 0:10] 132 [ 0:10] 133 test, input_iterator, output_iterator >(); [ 0:10] 134 test, input_iterator, bidirectional_iterator >(); [ 0:10] 135 test, input_iterator, bidirectional_iterator >(); [ 0:10] 136 test, input_iterator, random_access_iterator >(); [ 0:10] 137 test, input_iterator, int*>(); [ 0:10] 138 [ 0:10] 139 test, forward_iterator, output_iterator >(); [ 0:10] 140 test, forward_iterator, forward_iterator >(); [ 0:10] 141 test, forward_iterator, bidirectional_iterator >(); [ 0:10] 142 test, forward_iterator, random_access_iterator >(); [ 0:10] 143 test, forward_iterator, int*>(); [ 0:10] 144 [ 0:10] 145 test, bidirectional_iterator, output_iterator >(); [ 0:10] 146 test, bidirectional_iterator, forward_iterator >(); [ 0:10] 147 test, bidirectional_iterator, bidirectional_iterator >(); [ 0:10] 148 test, bidirectional_iterator, random_access_iterator >(); [ 0:10] 149 test, bidirectional_iterator, int*>(); [ 0:10] 150 [ 0:10] 151 test, random_access_iterator, output_iterator >(); [ 0:10] 152 test, random_access_iterator, forward_iterator >(); [ 0:10] 153 test, random_access_iterator, bidirectional_iterator >(); [ 0:10] 154 test, random_access_iterator, random_access_iterator >(); [ 0:10] 155 test, random_access_iterator, int*>(); [ 0:10] 156 [ 0:10] 157 test, const int*, output_iterator >(); [ 0:10] 158 test, const int*, forward_iterator >(); [ 0:10] 159 test, const int*, bidirectional_iterator >(); [ 0:10] 160 test, const int*, random_access_iterator >(); [ 0:10] 161 test, const int*, int*>(); [ 0:10] 162 [ 0:10] 163 test, input_iterator, output_iterator >(); [ 0:10] 164 test, input_iterator, bidirectional_iterator >(); [ 0:10] 165 test, input_iterator, bidirectional_iterator >(); [ 0:10] 166 test, input_iterator, random_access_iterator >(); [ 0:10] 167 test, input_iterator, int*>(); [ 0:10] 168 [ 0:10] 169 test, forward_iterator, output_iterator >(); [ 0:10] 170 test, forward_iterator, forward_iterator >(); [ 0:10] 171 test, forward_iterator, bidirectional_iterator >(); [ 0:10] 172 test, forward_iterator, random_access_iterator >(); [ 0:10] 173 test, forward_iterator, int*>(); [ 0:10] 174 [ 0:10] 175 test, bidirectional_iterator, output_iterator >(); [ 0:10] 176 test, bidirectional_iterator, forward_iterator >(); [ 0:10] 177 test, bidirectional_iterator, bidirectional_iterator >(); [ 0:10] 178 test, bidirectional_iterator, random_access_iterator >(); [ 0:10] 179 test, bidirectional_iterator, int*>(); [ 0:10] 180 [ 0:10] 181 test, random_access_iterator, output_iterator >(); [ 0:10] 182 test, random_access_iterator, forward_iterator >(); [ 0:10] 183 test, random_access_iterator, bidirectional_iterator >(); [ 0:10] 184 test, random_access_iterator, random_access_iterator >(); [ 0:10] 185 test, random_access_iterator, int*>(); [ 0:10] 186 [ 0:10] 187 test, const int*, output_iterator >(); [ 0:10] 188 test, const int*, forward_iterator >(); [ 0:10] 189 test, const int*, bidirectional_iterator >(); [ 0:10] 190 test, const int*, random_access_iterator >(); [ 0:10] 191 test, const int*, int*>(); [ 0:10] 192 [ 0:10] 193 test, output_iterator >(); [ 0:10] 194 test, bidirectional_iterator >(); [ 0:10] 195 test, bidirectional_iterator >(); [ 0:10] 196 test, random_access_iterator >(); [ 0:10] 197 test, int*>(); [ 0:10] 198 [ 0:10] 199 test, output_iterator >(); [ 0:10] 200 test, forward_iterator >(); [ 0:10] 201 test, bidirectional_iterator >(); [ 0:10] 202 test, random_access_iterator >(); [ 0:10] 203 test, int*>(); [ 0:10] 204 [ 0:10] 205 test, output_iterator >(); [ 0:10] 206 test, forward_iterator >(); [ 0:10] 207 test, bidirectional_iterator >(); [ 0:10] 208 test, random_access_iterator >(); [ 0:10] 209 test, int*>(); [ 0:10] 210 [ 0:10] 211 test, output_iterator >(); [ 0:10] 212 test, forward_iterator >(); [ 0:10] 213 test, bidirectional_iterator >(); [ 0:10] 214 test, random_access_iterator >(); [ 0:10] 215 test, int*>(); [ 0:10] 216 [ 0:10] 217 test >(); [ 0:10] 218 test >(); [ 0:10] 219 test >(); [ 0:10] 220 test >(); [ 0:10] 221 test(); [ 0:10] 222 [ 0:10] 223 #if TEST_STD_VER > 17 [ 0:10] 224 static_assert(test_constexpr()); [ 0:10] 225 #endif [ 0:10] 226 [ 0:10] 227 return 0; [ 0:10] 228 } [ 0:10] # no errors were expected but one was found anyway