[ 0:01] compiling /home/xrockai/src/divine/nightly/test/libcxx/algorithms/mismatch_pred.pass.cpp [ 0:01] In file included from /home/xrockai/src/divine/nightly/test/libcxx/algorithms/mismatch_pred.pass.cpp:24: [ 0:01] In file included from /dios/libcxx/include/algorithm:639: [ 0:01] In file included from /dios/libcxx/include/initializer_list:46: [ 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:01] compiling /dios/lib/config/seqklee.bc [ 0:01] setting up pass: functionmeta, options = [ 0:03] setting up pass: fuse-ctors, options = [ 0:03] KLEE: output directory is "/var/obj/divine-nightly/semidbg/test/__test_work_dir.20/_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: _Z10klee_abortv [ 0:11] KLEE: WARNING: undefined reference to function: __dios_tainted_init [ 0:11] KLEE: WARNING: undefined reference to function: klee_free [ 0:11] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:11] KLEE: WARNING ONCE: Using zero size array fix for landingpad instruction filter [ 0:11] i:1 [ 0:11] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:11] about to __boot:0 [ 0:11] about to run the scheduler:0 [ 0:11] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:11] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:11] KLEE: NOTE: now ignoring this error at this location [ 0:11] KLEE: ERROR: EXITING ON ERROR: [ 0:12] Error: failed external call: __dios_tainted_init [ 0:12] File: /dios/libc/sys/start.cpp [ 0:12] Line: 87 [ 0:12] assembly.ll line: 66635 [ 0:12] Stack: [ 0:12] #000066635 in __dios_start (l=2, argc=1, argv=94367602053640, envp=94367602130952) at /dios/libc/sys/start.cpp:87 [ 0:12] #100014630 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:12] #200075215 in klee_boot (argc=2, argv=94367570283904) at /dios/arch/klee/boot.c:41 [ 0:12] [ 0:12] [ 0:12] 1 /* TAGS: c++ fin */ [ 0:12] 2 /* CC_OPTS: -std=c++2a */ [ 0:12] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:12] 4 //===----------------------------------------------------------------------===// [ 0:12] 5 // [ 0:12] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:12] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:12] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:12] 9 // [ 0:12] 10 //===----------------------------------------------------------------------===// [ 0:12] 11 [ 0:12] 12 // [ 0:12] 13 [ 0:12] 14 // template Pred> [ 0:12] 16 // requires CopyConstructible [ 0:12] 17 // constexpr pair // constexpr after c++17 [ 0:12] 18 // mismatch(Iter1 first1, Iter1 last1, Iter2 first2, Pred pred); [ 0:12] 19 // [ 0:12] 20 // template [ 0:12] 21 // constexpr pair // constexpr after c++17 [ 0:12] 22 // mismatch(Iter1 first1, Iter1 last1, Iter2 first2, Iter2 last2, Pred pred); // C++14 [ 0:12] 23 [ 0:12] 24 #include [ 0:12] 25 #include [ 0:12] 26 #include [ 0:12] 27 [ 0:12] 28 #include "test_macros.h" [ 0:12] 29 #include "test_iterators.h" [ 0:12] 30 #include "counting_predicates.hpp" [ 0:12] 31 [ 0:12] 32 #if TEST_STD_VER > 17 [ 0:12] 33 TEST_CONSTEXPR bool eq(int a, int b) { return a == b; } [ 0:12] 34 [ 0:12] 35 TEST_CONSTEXPR bool test_constexpr() { [ 0:12] 36 int ia[] = {1, 3, 6, 7}; [ 0:12] 37 int ib[] = {1, 3}; [ 0:12] 38 int ic[] = {1, 3, 5, 7}; [ 0:12] 39 typedef input_iterator II; [ 0:12] 40 typedef bidirectional_iterator BI; [ 0:12] 41 [ 0:12] 42 auto p1 = std::mismatch(std::begin(ia), std::end(ia), std::begin(ic), eq); [ 0:12] 43 if (p1.first != ia+2 || p1.second != ic+2) [ 0:12] 44 return false; [ 0:12] 45 [ 0:12] 46 auto p2 = std::mismatch(std::begin(ia), std::end(ia), std::begin(ic), std::end(ic), eq); [ 0:12] 47 if (p2.first != ia+2 || p2.second != ic+2) [ 0:12] 48 return false; [ 0:12] 49 [ 0:12] 50 auto p3 = std::mismatch(std::begin(ib), std::end(ib), std::begin(ic), eq); [ 0:12] 51 if (p3.first != ib+2 || p3.second != ic+2) [ 0:12] 52 return false; [ 0:12] 53 [ 0:12] 54 auto p4 = std::mismatch(std::begin(ib), std::end(ib), std::begin(ic), std::end(ic), eq); [ 0:12] 55 if (p4.first != ib+2 || p4.second != ic+2) [ 0:12] 56 return false; [ 0:12] 57 [ 0:12] 58 auto p5 = std::mismatch(II(std::begin(ib)), II(std::end(ib)), II(std::begin(ic)), eq); [ 0:12] 59 if (p5.first != II(ib+2) || p5.second != II(ic+2)) [ 0:12] 60 return false; [ 0:12] 61 auto p6 = std::mismatch(BI(std::begin(ib)), BI(std::end(ib)), BI(std::begin(ic)), BI(std::end(ic)), eq); [ 0:12] 62 if (p6.first != BI(ib+2) || p6.second != BI(ic+2)) [ 0:12] 63 return false; [ 0:12] 64 [ 0:12] 65 return true; [ 0:12] 66 } [ 0:12] 67 #endif [ 0:12] 68 [ 0:12] 69 [ 0:12] 70 #if TEST_STD_VER > 11 [ 0:12] 71 #define HAS_FOUR_ITERATOR_VERSION [ 0:12] 72 #endif [ 0:12] 73 [ 0:12] 74 int main(int, char**) [ 0:12] 75 { [ 0:12] 76 int ia[] = {0, 1, 2, 2, 0, 1, 2, 3}; [ 0:12] 77 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:12] 78 int ib[] = {0, 1, 2, 3, 0, 1, 2, 3}; [ 0:12] 79 const unsigned sb = sizeof(ib)/sizeof(ib[0]); ((void)sb); // unused in C++11 [ 0:12] 80 [ 0:12] 81 typedef input_iterator II; [ 0:12] 82 typedef random_access_iterator RAI; [ 0:12] 83 typedef std::equal_to EQ; [ 0:12] 84 [ 0:12] 85 assert(std::mismatch(II(ia), II(ia + sa), II(ib), EQ()) [ 0:12] 86 == (std::pair(II(ia+3), II(ib+3)))); [ 0:12] 87 assert(std::mismatch(RAI(ia), RAI(ia + sa), RAI(ib), EQ()) [ 0:12] 88 == (std::pair(RAI(ia+3), RAI(ib+3)))); [ 0:12] 89 [ 0:12] 90 binary_counting_predicate bcp((EQ())); [ 0:12] 91 assert(std::mismatch(RAI(ia), RAI(ia + sa), RAI(ib), std::ref(bcp)) [ 0:12] 92 == (std::pair(RAI(ia+3), RAI(ib+3)))); [ 0:12] 93 assert(bcp.count() > 0 && bcp.count() < sa); [ 0:12] 94 bcp.reset(); [ 0:12] 95 [ 0:12] 96 #if TEST_STD_VER >= 14 [ 0:12] 97 assert(std::mismatch(II(ia), II(ia + sa), II(ib), II(ib + sb), EQ()) [ 0:12] 98 == (std::pair(II(ia+3), II(ib+3)))); [ 0:12] 99 assert(std::mismatch(RAI(ia), RAI(ia + sa), RAI(ib), RAI(ib + sb), EQ()) [ 0:12] 100 == (std::pair(RAI(ia+3), RAI(ib+3)))); [ 0:12] 101 [ 0:12] 102 assert(std::mismatch(II(ia), II(ia + sa), II(ib), II(ib + sb), std::ref(bcp)) [ 0:12] 103 == (std::pair(II(ia+3), II(ib+3)))); [ 0:12] 104 assert(bcp.count() > 0 && bcp.count() < std::min(sa, sb)); [ 0:12] 105 #endif [ 0:12] 106 [ 0:12] 107 assert(std::mismatch(ia, ia + sa, ib, EQ()) == [ 0:12] 108 (std::pair(ia+3,ib+3))); [ 0:12] 109 [ 0:12] 110 #if TEST_STD_VER >= 14 [ 0:12] 111 assert(std::mismatch(ia, ia + sa, ib, ib + sb, EQ()) == [ 0:12] 112 (std::pair(ia+3,ib+3))); [ 0:12] 113 assert(std::mismatch(ia, ia + sa, ib, ib + 2, EQ()) == [ 0:12] 114 (std::pair(ia+2,ib+2))); [ 0:12] 115 #endif [ 0:12] 116 [ 0:12] 117 #if TEST_STD_VER > 17 [ 0:12] 118 static_assert(test_constexpr()); [ 0:12] 119 #endif [ 0:12] 120 [ 0:12] 121 return 0; [ 0:12] 122 } [ 0:12] # no errors were expected but one was found anyway