[ 0:01] compiling /home/xrockai/src/divine/nightly/test/libcxx/algorithms/reverse_copy.pass.cpp [ 0:01] In file included from /home/xrockai/src/divine/nightly/test/libcxx/algorithms/reverse_copy.pass.cpp:18: [ 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.13/_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:09] KLEE: WARNING: undefined reference to function: klee_free [ 0:09] KLEE: WARNING: undefined reference to function: klee_malloc [ 0:09] i:1 [ 0:09] KLEE: WARNING ONCE: Alignment of memory from call "klee_malloc" is not modelled. Using alignment of 8. [ 0:09] about to __boot:0 [ 0:09] about to run the scheduler:0 [ 0:09] KLEE: WARNING ONCE: calling external: __dios_tainted_init() at /dios/libc/sys/start.cpp:49 5 [ 0:09] KLEE: ERROR: /dios/libc/sys/start.cpp:87: failed external call: __dios_tainted_init [ 0:09] KLEE: NOTE: now ignoring this error at this location [ 0:09] KLEE: ERROR: EXITING ON ERROR: [ 0:09] Error: failed external call: __dios_tainted_init [ 0:09] File: /dios/libc/sys/start.cpp [ 0:09] Line: 87 [ 0:09] assembly.ll line: 43072 [ 0:09] Stack: [ 0:09] #000043072 in __dios_start (l=2, argc=1, argv=94084263793160, envp=94084263886856) at /dios/libc/sys/start.cpp:87 [ 0:09] #100019081 in _ZN6__dios10sched_nullINS_5ClockINS_10NondetKleeINS_4BaseEEEEEE13run_schedulerINS_7ContextEEEvv () at /dios/sys/sched_null.hpp:163 [ 0:09] #200051320 in klee_boot (argc=2, argv=94084235754240) at /dios/arch/klee/boot.c:41 [ 0:09] [ 0:09] [ 0:09] 1 /* TAGS: c++ fin */ [ 0:09] 2 /* CC_OPTS: -std=c++2a */ [ 0:09] 3 /* VERIFY_OPTS: -o nofail:malloc */ [ 0:09] 4 //===----------------------------------------------------------------------===// [ 0:09] 5 // [ 0:09] 6 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. [ 0:09] 7 // See https://llvm.org/LICENSE.txt for license information. [ 0:09] 8 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception [ 0:09] 9 // [ 0:09] 10 //===----------------------------------------------------------------------===// [ 0:09] 11 [ 0:09] 12 // [ 0:09] 13 [ 0:09] 14 // template OutIter> [ 0:09] 15 // constexpr OutIter // constexpr after C++17 [ 0:09] 16 // reverse_copy(InIter first, InIter last, OutIter result); [ 0:09] 17 [ 0:09] 18 #include [ 0:09] 19 #include [ 0:09] 20 [ 0:09] 21 #include "test_macros.h" [ 0:09] 22 #include "test_iterators.h" [ 0:09] 23 [ 0:09] 24 #if TEST_STD_VER > 17 [ 0:09] 25 TEST_CONSTEXPR bool test_constexpr() { [ 0:09] 26 int ia[] = {1, 3, 5, 2, 5, 6}; [ 0:09] 27 int ib[std::size(ia)] = {0}; [ 0:09] 28 [ 0:09] 29 auto it = std::reverse_copy(std::begin(ia), std::end(ia), std::begin(ib)); [ 0:09] 30 [ 0:09] 31 return std::distance(std::begin(ib), it) == std::size(ia) [ 0:09] 32 && std::equal (std::begin(ia), std::end(ia), std::rbegin(ib)) [ 0:09] 33 ; [ 0:09] 34 } [ 0:09] 35 #endif [ 0:09] 36 [ 0:09] 37 template [ 0:09] 38 void [ 0:09] 39 test() [ 0:09] 40 { [ 0:09] 41 const int ia[] = {0}; [ 0:09] 42 const unsigned sa = sizeof(ia)/sizeof(ia[0]); [ 0:09] 43 int ja[sa] = {-1}; [ 0:09] 44 OutIter r = std::reverse_copy(InIter(ia), InIter(ia), OutIter(ja)); [ 0:09] 45 assert(base(r) == ja); [ 0:09] 46 assert(ja[0] == -1); [ 0:09] 47 r = std::reverse_copy(InIter(ia), InIter(ia+sa), OutIter(ja)); [ 0:09] 48 assert(ja[0] == 0); [ 0:09] 49 [ 0:09] 50 const int ib[] = {0, 1}; [ 0:09] 51 const unsigned sb = sizeof(ib)/sizeof(ib[0]); [ 0:09] 52 int jb[sb] = {-1}; [ 0:09] 53 r = std::reverse_copy(InIter(ib), InIter(ib+sb), OutIter(jb)); [ 0:09] 54 assert(base(r) == jb+sb); [ 0:09] 55 assert(jb[0] == 1); [ 0:09] 56 assert(jb[1] == 0); [ 0:09] 57 [ 0:09] 58 const int ic[] = {0, 1, 2}; [ 0:09] 59 const unsigned sc = sizeof(ic)/sizeof(ic[0]); [ 0:09] 60 int jc[sc] = {-1}; [ 0:09] 61 r = std::reverse_copy(InIter(ic), InIter(ic+sc), OutIter(jc)); [ 0:09] 62 assert(base(r) == jc+sc); [ 0:09] 63 assert(jc[0] == 2); [ 0:09] 64 assert(jc[1] == 1); [ 0:09] 65 assert(jc[2] == 0); [ 0:09] 66 [ 0:09] 67 int id[] = {0, 1, 2, 3}; [ 0:09] 68 const unsigned sd = sizeof(id)/sizeof(id[0]); [ 0:09] 69 int jd[sd] = {-1}; [ 0:09] 70 r = std::reverse_copy(InIter(id), InIter(id+sd), OutIter(jd)); [ 0:09] 71 assert(base(r) == jd+sd); [ 0:09] 72 assert(jd[0] == 3); [ 0:09] 73 assert(jd[1] == 2); [ 0:09] 74 assert(jd[2] == 1); [ 0:09] 75 assert(jd[3] == 0); [ 0:09] 76 } [ 0:09] 77 [ 0:09] 78 int main(int, char**) [ 0:09] 79 { [ 0:09] 80 test, output_iterator >(); [ 0:09] 81 test, forward_iterator >(); [ 0:09] 82 test, bidirectional_iterator >(); [ 0:09] 83 test, random_access_iterator >(); [ 0:09] 84 test, int*>(); [ 0:09] 85 [ 0:09] 86 test, output_iterator >(); [ 0:09] 87 test, forward_iterator >(); [ 0:09] 88 test, bidirectional_iterator >(); [ 0:09] 89 test, random_access_iterator >(); [ 0:09] 90 test, int*>(); [ 0:09] 91 [ 0:09] 92 test >(); [ 0:09] 93 test >(); [ 0:09] 94 test >(); [ 0:09] 95 test >(); [ 0:09] 96 test(); [ 0:09] 97 [ 0:09] 98 #if TEST_STD_VER > 17 [ 0:09] 99 static_assert(test_constexpr()); [ 0:09] 100 #endif [ 0:09] 101 [ 0:09] 102 return 0; [ 0:09] 103 } [ 0:09] # no errors were expected but one was found anyway