Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amurzeau/ca58f3ebe890371a295d8f2537fa09cc to your computer and use it in GitHub Desktop.
Save amurzeau/ca58f3ebe890371a295d8f2537fa09cc to your computer and use it in GitHub Desktop.
GCC maybe-uninitialized in range-v3
See line 150 for assign2.
;; Function ranges::v3::bad_variant_access::~bad_variant_access (_ZN6ranges2v318bad_variant_accessD2Ev, funcdef_no=6211, decl_uid=90493, cgraph_uid=1586, symbol_order=1718)
ranges::v3::bad_variant_access::~bad_variant_access (struct bad_variant_access * const this)
{
struct logic_error * _1;
<bb 2> [local count: 1073741825]:
# .MEM_4 = VDEF <.MEM_2(D)>
this_3(D)->D.90508.D.26048._vptr.exception = &MEM[(void *)&_ZTVN6ranges2v318bad_variant_accessE + 16B];
_1 = &this_3(D)->D.90508;
# .MEM_5 = VDEF <.MEM_4>
std::logic_error::~logic_error (_1); [tail call]
# VUSE <.MEM_5>
return;
}
;; Function ranges::v3::bad_variant_access::~bad_variant_access (_ZN6ranges2v318bad_variant_accessD0Ev, funcdef_no=6213, decl_uid=90487, cgraph_uid=1588, symbol_order=1720)
ranges::v3::bad_variant_access::~bad_variant_access (struct bad_variant_access * const this)
{
struct logic_error * _4;
<bb 2> [local count: 1073741825]:
# .MEM_5 = VDEF <.MEM_1(D)>
this_2(D)->D.90508.D.26048._vptr.exception = &MEM[(void *)&_ZTVN6ranges2v318bad_variant_accessE + 16B];
_4 = &this_2(D)->D.90508;
# .MEM_6 = VDEF <.MEM_5>
std::logic_error::~logic_error (_4);
# .MEM_3 = VDEF <.MEM_6>
operator delete (this_2(D), 16); [tail call]
# VUSE <.MEM_3>
return;
}
;; Function ranges::v3::detail::get_fn<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, 0>::_ZNK6ranges2v36detail6get_fnINS0_16counted_iteratorINS0_14basic_iteratorINS0_9iota_viewIivEEEEvEELm0EEclINS0_16default_sentinelELm1EEEN4meta2v16detail4_if_INSD_4listIJSt17integral_constantIbXneT0_Lm0EEEEEESH_IbLb1EEE4typeENS0_15indexed_elementIT_XT0_EEE.isra.20 (_ZNK6ranges2v36detail6get_fnINS0_16counted_iteratorINS0_14basic_iteratorINS0_9iota_viewIivEEEEvEELm0EEclINS0_16default_sentinelELm1EEEN4meta2v16detail4_if_INSD_4listIJSt17integral_constantIbXneT0_Lm0EEEEEESH_IbLb1EEE4typeENS0_15indexed_elementIT_XT0_EEE.isra.20, funcdef_no=6581, decl_uid=181316, cgraph_uid=1566, symbol_order=4495) (executed once)
__attribute__((noreturn))
ranges::v3::detail::get_fn<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, 0>::_ZNK6ranges2v36detail6get_fnINS0_16counted_iteratorINS0_14basic_iteratorINS0_9iota_viewIivEEEEvEELm0EEclINS0_16default_sentinelELm1EEEN4meta2v16detail4_if_INSD_4listIJSt17integral_constantIbXneT0_Lm0EEEEEESH_IbLb1EEE4typeENS0_15indexed_elementIT_XT0_EEE.isra.20 ()
{
void * _1;
struct logic_error * _2;
<bb 2> [local count: 1073741825]:
# .MEM_4 = VDEF <.MEM_3(D)>
_1 = __cxa_allocate_exception (16);
_2 = &MEM[(struct bad_variant_access *)_1].D.90508;
# .MEM_6 = VDEF <.MEM_4>
std::logic_error::logic_error (_2, "bad variant access");
<bb 3> [count: 0]:
# .MEM_7 = VDEF <.MEM_6>
MEM[(struct bad_variant_access *)_1].D.90508.D.26048._vptr.exception = &MEM[(void *)&_ZTVN6ranges2v318bad_variant_accessE + 16B];
# .MEM_8 = VDEF <.MEM_7>
__cxa_throw (_1, &_ZTIN6ranges2v318bad_variant_accessE, __dt_comp );
<bb 4> [count: 0]:
<L0>:
# .MEM_9 = VDEF <.MEM_6>
__cxa_free_exception (_1);
resx 2
}
;; Function ranges::v3::operator==<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel, ranges::v3::default_sentinel> (_ZN6ranges2v3eqINS0_16counted_iteratorINS0_14basic_iteratorINS0_9iota_viewIivEEEEvEES7_NS0_16default_sentinelES8_Lb0ELPv0EEEbRKNS0_15common_iteratorIT_T1_EERKNSA_IT0_T2_EE, funcdef_no=5952, decl_uid=163543, cgraph_uid=1328, symbol_order=1460)
ranges::v3::operator==<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel, ranges::v3::default_sentinel> (const struct common_iterator & x, const struct common_iterator & y)
{
bool D.184208;
bool iftmp.25_1;
long unsigned int _7;
long int _9;
bool _10;
bool _12;
long int _13;
long int _14;
bool _15;
long unsigned int pretmp_17;
long int _22;
<bb 2> [local count: 1073741825]:
# VUSE <.MEM_3(D)>
_7 = MEM[(long unsigned int *)x_4(D) + 16B];
# VUSE <.MEM_3(D)>
pretmp_17 = MEM[(long unsigned int *)y_5(D) + 16B];
if (_7 == 1)
goto <bb 3>; [34.00%]
else
goto <bb 5>; [66.00%]
<bb 3> [local count: 365072220]:
if (pretmp_17 == 1)
goto <bb 9>; [34.00%]
else
goto <bb 4>; [66.00%]
<bb 9> [local count: 124124556]:
goto <bb 8>; [100.00%]
<bb 4> [local count: 240851286]:
# VUSE <.MEM_3(D)>
_22 = MEM[(long int *)y_5(D) + 8B];
_12 = _22 == 0;
goto <bb 8>; [100.00%]
<bb 5> [local count: 708669604]:
if (pretmp_17 == 1)
goto <bb 6>; [34.00%]
else
goto <bb 7>; [66.00%]
<bb 6> [local count: 240851286]:
# VUSE <.MEM_3(D)>
_9 = MEM[(long int *)x_4(D) + 8B];
_10 = _9 == 0;
goto <bb 8>; [100.00%]
<bb 7> [local count: 467721939]:
# VUSE <.MEM_3(D)>
_13 = MEM[(long int *)x_4(D) + 8B];
# VUSE <.MEM_3(D)>
_14 = MEM[(long int *)y_5(D) + 8B];
_15 = _13 == _14;
<bb 8> [local count: 1073174963]:
# iftmp.25_1 = PHI <_12(4), _15(7), _10(6), 1(9)>
# VUSE <.MEM_3(D)>
return iftmp.25_1;
}
;; Function testype::assign2<ranges::v3::common_iterator<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel> > (_ZN7testype7assign2IN6ranges2v315common_iteratorINS2_16counted_iteratorINS2_14basic_iteratorINS2_9iota_viewIivEEEEvEENS2_16default_sentinelEEEEEvT_SC_, funcdef_no=5944, decl_uid=163257, cgraph_uid=1320, symbol_order=1452)
testype::assign2<ranges::v3::common_iterator<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel> > (struct testype * const this, struct common_iterator & restrict __first, struct common_iterator & restrict __last)
{
difference_type_t D__cnt__lsm.432;
difference_type_t D__cnt__lsm.431;
difference_type_t D__cnt__lsm.430;
unsigned long ivtmp.428;
unsigned long ivtmp.419;
unsigned long ivtmp.411;
difference_type_t D__cnt__lsm0.407;
difference_type_t D__cnt__lsm0.406;
difference_type_t D__cnt__lsm0.405;
int D__lsm.404;
struct common_iterator & D.184304;
bool D.184272;
bool D.184257;
int * __cur;
struct common_iterator D.184249;
struct common_iterator D.184248;
struct common_iterator D.167412;
struct common_iterator D.167417;
long unsigned int _6;
long unsigned int iftmp.47_10;
long unsigned int iftmp.47_11;
long unsigned int _12;
long unsigned int iftmp.47_14;
long unsigned int iftmp.47_15;
long unsigned int _21;
bool _25;
bool _26;
long unsigned int iftmp.47_28;
long unsigned int iftmp.47_32;
long unsigned int _35;
unsigned int _36;
unsigned int _38;
unsigned int _40;
bool _43;
int * _44;
long unsigned int _47;
long int _50;
long unsigned int _51;
bool _52;
long int _54;
unsigned int _55;
long unsigned int iftmp.47_56;
long int _59;
unsigned int _63;
long unsigned int _64;
int * _65;
int _66;
int _70;
long unsigned int _80;
bool _82;
long unsigned int _88;
long int _96;
int _98;
long int _104;
int _191;
long unsigned int _192;
long unsigned int _193;
long unsigned int _194;
long int _198;
unsigned int _199;
int _218;
long unsigned int _219;
long unsigned int _220;
unsigned int _222;
unsigned int _224;
unsigned int _225;
int * _244;
long unsigned int _272;
long unsigned int _274;
long int _279;
long int _293;
long unsigned int _309;
int * _310;
long unsigned int _327;
long int _328;
unsigned int _334;
unsigned int _336;
unsigned int _339;
int _340;
long int _343;
//
// unintialized use path:
// bb 2
// __last is sentinel => _12 = 1, goto bb 4
// bb 4
// iftmp.47_14 = 1
// bb 5
// __first is counted_iterator (not sentinel) => _6 = 0
// iftmp.47_15 = iftmp.47_14 (bb 4) = 1
// bb 6
// D.167412 underlying storage get initialized with __first
// bb 8
// iftmp.47_15 == 1 => goto bb 10
// iftmp.47_11 = 0 (we didn't executed bb 7 because __first is not sentinel)
// bb 10
// iftmp.47_11 == 0 => goto bb 11
// bb 11
// _293 = MEM[(long int *)&D.184248 + 8B] => D.184248 didn't get initialized
// D.184248 storage is initialized in bb 9 (first instruction)
//
// codepath goes to bb 9 via:
// bb 8 if iftmp.47_15 == 0
// => this is the condition to get D.184248 initialized
//
// _293 is used for _279 in bb 13
// _279 is used in bb 13 and bb 18
//
// codepath goes to bb 13 via:
// bb 40
// bb 9
// bb 8 only if iftmp.47_15 == 0 (not the case here as __last is sentinel)
// => so bb 13 is never executed in fact if D.184248 is not initialized (same condition as the one to get D.184248 initialized)
//
//
// codepath goes to bb 18 via:
// bb 15
// bb 14
// bb 13
// => see codepath to bb 13
<bb 2> [local count: 1073741826]:
# .MEM_18 = VDEF <.MEM_1(D)>
MEM[(struct &)&D.167417] ={v} {CLOBBER};
# .MEM_19 = VDEF <.MEM_18>
MEM[(struct &)&D.167417] ={v} {CLOBBER};
# VUSE <.MEM_19>
_12 = MEM[(long unsigned int *)__last_2(D) + 16B];
if (_12 == 0)
goto <bb 3>; [50.00%]
else
goto <bb 4>; [50.00%]
<bb 3> [local count: 536870918]:
# .MEM_20 = VDEF <.MEM_19>
MEM[(struct Head *)&D.167417] = MEM[(const struct indexed_datum *)__last_2(D)];
goto <bb 5>; [100.00%]
<bb 4> [local count: 536870918]:
_52 = _12 != 1;
_51 = (long unsigned int) _52;
iftmp.47_14 = _51 + 1;
<bb 5> [local count: 1073741826]:
# iftmp.47_15 = PHI <0(3), iftmp.47_14(4)>
# .MEM_17 = PHI <.MEM_20(3), .MEM_19(4)>
# .MEM_22 = VDEF <.MEM_17>
MEM[(struct &)&D.167412] ={v} {CLOBBER};
# .MEM_23 = VDEF <.MEM_22>
MEM[(struct &)&D.167412] ={v} {CLOBBER};
# VUSE <.MEM_23>
_6 = MEM[(long unsigned int *)__first_3(D) + 16B];
if (_6 == 0)
goto <bb 6>; [50.00%]
else
goto <bb 7>; [50.00%]
<bb 6> [local count: 536870918]:
# .MEM_24 = VDEF <.MEM_23>
MEM[(struct Head *)&D.167412] = MEM[(const struct indexed_datum *)__first_3(D)];
goto <bb 8>; [100.00%]
<bb 7> [local count: 536870918]:
_25 = _6 != 1;
_64 = (long unsigned int) _25;
iftmp.47_10 = _64 + 1;
<bb 8> [local count: 1073741826]:
# iftmp.47_11 = PHI <0(6), iftmp.47_10(7)>
# .MEM_16 = PHI <.MEM_24(6), .MEM_23(7)>
# .MEM_72 = VDEF <.MEM_16>
MEM[(struct &)&D.184248] ={v} {CLOBBER};
# .MEM_73 = VDEF <.MEM_72>
MEM[(struct &)&D.184248] ={v} {CLOBBER};
if (iftmp.47_15 == 0)
goto <bb 9>; [50.00%]
else
goto <bb 10>; [50.00%]
<bb 9> [local count: 536870918]:
# .MEM_74 = VDEF <.MEM_73>
MEM[(struct Head *)&D.184248] = MEM[(const struct indexed_datum *)&D.167417];
# .MEM_148 = VDEF <.MEM_74>
MEM[(struct variant *)&D.184248].index_ = 0;
# .MEM_228 = VDEF <.MEM_148>
MEM[(struct &)&D.184249] ={v} {CLOBBER};
# .MEM_189 = VDEF <.MEM_228>
MEM[(struct &)&D.184249] ={v} {CLOBBER};
if (iftmp.47_11 == 0)
goto <bb 40>; [50.00%]
else
goto <bb 41>; [50.00%]
<bb 10> [local count: 536870918]:
_26 = iftmp.47_15 != 1;
_21 = (long unsigned int) _26;
iftmp.47_28 = _21 + 1;
# .MEM_75 = VDEF <.MEM_73>
MEM[(struct variant *)&D.184248].index_ = iftmp.47_28;
# .MEM_76 = VDEF <.MEM_75>
MEM[(struct &)&D.184249] ={v} {CLOBBER};
# .MEM_77 = VDEF <.MEM_76>
MEM[(struct &)&D.184249] ={v} {CLOBBER};
if (iftmp.47_11 == 0)
goto <bb 11>; [50.00%]
else
goto <bb 42>; [50.00%]
<bb 42> [local count: 268435463]:
goto <bb 12>; [100.00%]
<bb 11> [local count: 439950673]:
# .MEM_78 = VDEF <.MEM_77>
MEM[(struct Head *)&D.184249] = MEM[(const struct indexed_datum *)&D.167412];
# .MEM_335 = VDEF <.MEM_78>
MEM[(struct variant *)&D.184249].index_ = 0;
# VUSE <.MEM_335>
__cur_338 = this_4(D)->D.120557.D.120504._M_impl._M_start;
# VUSE <.MEM_335>
_293 = MEM[(long int *)&D.184248 + 8B]; // maybe-uninitialized triggered here: use of uninitialized MEM[(long int *)&D.184248 + 8B]
# VUSE <.MEM_335>
D__lsm.404_294 = MEM[(int *)&D.184249];
if (iftmp.47_28 == 1)
goto <bb 19>; [54.75%]
else
goto <bb 43>; [45.25%]
<bb 41> [local count: 268435459]:
<bb 12> [local count: 536870918]:
# iftmp.47_56 = PHI <0(41), iftmp.47_28(42)>
# .MEM_58 = PHI <.MEM_189(41), .MEM_77(42)>
_82 = iftmp.47_11 != 1;
_80 = (long unsigned int) _82;
iftmp.47_32 = _80 + 1;
# .MEM_79 = VDEF <.MEM_58>
MEM[(struct variant *)&D.184249].index_ = iftmp.47_32;
# VUSE <.MEM_79>
__cur_34 = this_4(D)->D.120557.D.120504._M_impl._M_start;
# VUSE <.MEM_79>
_54 = MEM[(long int *)&D.184248 + 8B];
# VUSE <.MEM_79>
D__lsm.404_9 = MEM[(int *)&D.184249];
if (iftmp.47_32 == 1)
goto <bb 27>; [67.33%]
else
goto <bb 30>; [32.67%]
<bb 43> [local count: 199099386]:
<bb 13> [local count: 467534846]:
# _279 = PHI <_343(40), _293(43)>
# D__lsm.404_275 = PHI <D__lsm.404_232(40), D__lsm.404_294(43)>
# .MEM_276 = PHI <.MEM_302(40), .MEM_335(43)>
# __cur_277 = PHI <__cur_303(40), __cur_338(43)>
# VUSE <.MEM_276>
_328 = MEM[(long int *)&D.184249 + 8B];
if (_279 == _328)
goto <bb 44>; [0.42%]
else
goto <bb 14>; [99.58%]
<bb 44> [local count: 1955079]:
goto <bb 32>; [100.00%]
<bb 14> [local count: 441410543]:
# VUSE <.MEM_276>
_310 = this_4(D)->D.120557.D.120504._M_impl._M_finish;
if (__cur_277 != _310)
goto <bb 15>; [94.50%]
else
goto <bb 45>; [5.50%]
<bb 45> [local count: 24277580]:
goto <bb 34>; [100.00%]
<bb 15> [local count: 417132963]:
# VUSE <.MEM_276>
_218 = *__cur_277;
_220 = (long unsigned int) _218;
_272 = _220 + 1;
_274 = _272 * 4;
__cur_236 = __cur_277 + _274;
_59 = _328 + -1;
ivtmp.411_61 = (unsigned long) _59;
goto <bb 18>; [100.00%]
<bb 16> [local count: 3639664595]:
if (__cur_245 != _310)
goto <bb 17>; [94.50%]
else
goto <bb 33>; [5.50%]
<bb 17> [local count: 3439483041]:
# VUSE <.MEM_276>
_191 = *__cur_245;
_192 = (long unsigned int) _191;
_193 = _192 + 1;
_194 = _193 * 4;
__cur_195 = __cur_245 + _194;
ivtmp.411_30 = ivtmp.411_107 + 18446744073709551615;
<bb 18> [local count: 3853531331]:
# __cur_245 = PHI <__cur_236(15), __cur_195(17)>
# ivtmp.411_107 = PHI <ivtmp.411_61(15), ivtmp.411_30(17)>
_36 = (unsigned int) _59;
_38 = (unsigned int) D__lsm.404_275;
_225 = _38 + 1;
_40 = (unsigned int) ivtmp.411_107;
_222 = _36 + _225;
_63 = _222 - _40;
_66 = (int) _63;
_198 = (long int) ivtmp.411_107;
if (_198 == _279)
goto <bb 31>; [0.42%]
else
goto <bb 16>; [99.58%]
<bb 19> [local count: 240851288]:
# VUSE <.MEM_335>
_104 = MEM[(long int *)&D.184249 + 8B];
if (_104 == 0)
goto <bb 46>; [0.42%]
else
goto <bb 20>; [99.58%]
<bb 46> [local count: 1007162]:
goto <bb 32>; [100.00%]
<bb 20> [local count: 227484307]:
# VUSE <.MEM_335>
_65 = this_4(D)->D.120557.D.120504._M_impl._M_finish;
if (_65 != __cur_338)
goto <bb 21>; [94.50%]
else
goto <bb 47>; [5.50%]
<bb 47> [local count: 12511637]:
goto <bb 34>; [100.00%]
<bb 21> [local count: 214972670]:
# VUSE <.MEM_335>
_70 = *__cur_338;
_327 = (long unsigned int) _70;
_309 = _327 + 1;
_219 = _309 * 4;
__cur_273 = __cur_338 + _219;
_50 = _104 + -1;
ivtmp.419_49 = (unsigned long) _50;
goto <bb 25>; [100.00%]
<bb 22> [local count: 1875729051]:
if (_65 != __cur_129)
goto <bb 24>; [94.50%]
else
goto <bb 23>; [5.50%]
<bb 23> [local count: 103165097]:
# .MEM_319 = VDEF <.MEM_335>
MEM[(struct counted_iterator *)&D.184249].cnt_ = _96;
goto <bb 34>; [100.00%]
<bb 24> [local count: 1772563953]:
# VUSE <.MEM_335>
_98 = *__cur_129;
_35 = (long unsigned int) _98;
_47 = _35 + 1;
_88 = _47 * 4;
__cur_45 = __cur_129 + _88;
ivtmp.419_57 = ivtmp.419_87 + 18446744073709551615;
<bb 25> [local count: 1985946912]:
# __cur_129 = PHI <__cur_273(21), __cur_45(24)>
# ivtmp.419_87 = PHI <ivtmp.419_49(21), ivtmp.419_57(24)>
_55 = (unsigned int) _50;
_334 = (unsigned int) D__lsm.404_294;
_199 = _334 + 1;
_336 = (unsigned int) ivtmp.419_87;
_224 = _55 + _199;
_339 = _224 - _336;
_340 = (int) _339;
_96 = (long int) ivtmp.419_87;
if (_96 == 0)
goto <bb 26>; [0.42%]
else
goto <bb 22>; [99.58%]
<bb 26> [local count: 8304586]:
# .MEM_320 = VDEF <.MEM_335>
MEM[(struct counted_iterator *)&D.184249].cnt_ = 0;
goto <bb 32>; [100.00%]
<bb 27> [local count: 146029]:
if (_54 == 0)
goto <bb 48>; [50.00%]
else
goto <bb 28>; [50.00%]
<bb 28> [local count: 73015]:
if (iftmp.47_56 == 0)
goto <bb 29>; [99.96%]
else
goto <bb 49>; [0.04%]
<bb 49> [local count: 29]:
goto <bb 36>; [100.00%]
<bb 29> [local count: 637337]:
# VUSE <.MEM_79>
_244 = this_4(D)->D.120557.D.120504._M_impl._M_finish;
if (__cur_34 != _244)
goto <bb 35>; [94.50%]
else
goto <bb 50>; [5.50%]
<bb 50> [local count: 35054]:
goto <bb 34>; [100.00%]
<bb 30> [count: 0]:
__builtin_unreachable ();
<bb 31> [local count: 16114218]:
# .MEM_187 = VDEF <.MEM_276>
MEM[(struct counted_iterator *)&D.184249].cnt_ = _198;
<bb 32> [local count: 27380263]:
# D__lsm.404_85 = PHI <D__lsm.404_275(44), _66(31), _340(26), D__lsm.404_294(46)>
# __cur_105 = PHI <__cur_277(44), __cur_245(31), __cur_129(26), __cur_338(46)>
# .MEM_101 = PHI <.MEM_276(44), .MEM_187(31), .MEM_320(26), .MEM_335(46)>
# .MEM_100 = VDEF <.MEM_101>
MEM[(int *)&D.184249] = D__lsm.404_85;
goto <bb 36>; [100.00%]
<bb 33> [local count: 200181552]:
# .MEM_196 = VDEF <.MEM_276>
MEM[(struct counted_iterator *)&D.184249].cnt_ = _198;
<bb 34> [local count: 515699744]:
# D__lsm.404_60 = PHI <_340(23), _66(33), D__lsm.404_275(45), D__lsm.404_294(47), D__lsm.404_9(50)>
# __cur_86 = PHI <__cur_129(23), _310(33), __cur_277(45), __cur_338(47), _244(50)>
# .MEM_81 = PHI <.MEM_319(23), .MEM_196(33), .MEM_276(45), .MEM_335(47), .MEM_79(50)>
# .MEM_99 = VDEF <.MEM_81>
MEM[(int *)&D.184249] = D__lsm.404_60;
goto <bb 36>; [100.00%]
<bb 35> [local count: 3542841]:
# .MEM_89 = VDEF <.MEM_79>
ranges::v3::detail::get_fn<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, 0>::_ZNK6ranges2v36detail6get_fnINS0_16counted_iteratorINS0_14basic_iteratorINS0_9iota_viewIivEEEEvEELm0EEclINS0_16default_sentinelELm1EEEN4meta2v16detail4_if_INSD_4listIJSt17integral_constantIbXneT0_Lm0EEEEEESH_IbLb1EEE4typeENS0_15indexed_elementIT_XT0_EEE.isra.20 ();
<bb 48> [local count: 73015]:
<bb 36> [local count: 1061413769]:
# .MEM_31 = PHI <.MEM_99(34), .MEM_100(32), .MEM_79(48), .MEM_79(49)>
# __cur_83 = PHI <__cur_86(34), __cur_105(32), __cur_34(48), __cur_34(49)>
# VUSE <.MEM_31>
_43 = ranges::v3::operator==<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel, ranges::v3::default_sentinel> (&D.184249, &D.184248);
if (_43 != 0)
goto <bb 37>; [50.00%]
else
goto <bb 51>; [50.00%]
<bb 51> [local count: 530706885]:
goto <bb 39>; [100.00%]
<bb 37> [local count: 530706885]:
# VUSE <.MEM_31>
_44 = MEM[(int * *)this_4(D) + 8B];
if (_44 != __cur_83)
goto <bb 38>; [70.00%]
else
goto <bb 52>; [30.00%]
<bb 52> [local count: 159212064]:
goto <bb 39>; [100.00%]
<bb 38> [local count: 371494817]:
# .MEM_90 = VDEF <.MEM_31>
MEM[(int * *)this_4(D) + 8B] = __cur_83;
<bb 39> [local count: 1061413769]:
# .MEM_71 = PHI <.MEM_90(38), .MEM_31(51), .MEM_31(52)>
# .MEM_91 = VDEF <.MEM_71>
D.184249 ={v} {CLOBBER};
# .MEM_92 = VDEF <.MEM_91>
D.184248 ={v} {CLOBBER};
# .MEM_7 = VDEF <.MEM_92>
D.167412 ={v} {CLOBBER};
# .MEM_8 = VDEF <.MEM_7>
D.167417 ={v} {CLOBBER};
# VUSE <.MEM_8>
return;
<bb 40> [local count: 268435461]:
# .MEM_301 = VDEF <.MEM_189>
MEM[(struct Head *)&D.184249] = MEM[(const struct indexed_datum *)&D.167412];
# .MEM_302 = VDEF <.MEM_301>
MEM[(struct variant *)&D.184249].index_ = 0;
# VUSE <.MEM_302>
__cur_303 = this_4(D)->D.120557.D.120504._M_impl._M_start;
# VUSE <.MEM_302>
_343 = MEM[(long int *)&D.184248 + 8B];
# VUSE <.MEM_302>
D__lsm.404_232 = MEM[(int *)&D.184249];
goto <bb 13>; [100.00%]
}
;; Function std::vector<int>::_M_realloc_insert<int> (_ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_, funcdef_no=6421, decl_uid=176810, cgraph_uid=1797, symbol_order=1929)
std::vector<int>::_M_realloc_insert<int> (struct vector * const this, struct iterator __position, int & __args#0)
{
vector(2) long unsigned int * vectp.434;
vector(2) long unsigned int * {ref-all} vectp_this.433;
const long unsigned int D.184350;
const size_type __len;
size_type D.184349;
size_type __n;
int * D.184344;
int * const __position;
int * __new_finish;
int * __old_finish;
int * __old_start;
long unsigned int _1;
int * _2;
int _24;
int * _34;
int * iftmp.60_35;
int * _36;
int * _37;
long int _38;
long int _39;
long unsigned int _40;
vector(2) long unsigned int _49;
long unsigned int _58;
long unsigned int _59;
long int _65;
int * _66;
long unsigned int _69;
long unsigned int _71;
long unsigned int prephitmp_73;
int * _82;
int * prephitmp_86;
long int _87;
int * _88;
long unsigned int _89;
<bb 2> [local count: 1073741825]:
# VUSE <.MEM_3(D)>
__position_10 = MEM[(struct __normal_iterator *)&__position];
# VUSE <.MEM_3(D)>
_36 = MEM[(int * *)this_4(D)];
# VUSE <.MEM_3(D)>
_37 = MEM[(int * *)this_4(D) + 8B];
_38 = _37 - _36;
_39 = _38 /[ex] 4;
_40 = (long unsigned int) _39;
_65 = __position_10 - _36;
if (_40 == 0)
goto <bb 15>; [34.00%]
else
goto <bb 3>; [66.00%]
<bb 15> [local count: 365072224]:
goto <bb 6>; [100.00%]
<bb 3> [local count: 708386132]:
__len_45 = _40 * 2;
if (_40 > __len_45)
goto <bb 16>; [53.03%]
else
goto <bb 4>; [46.97%]
<bb 16> [local count: 375659318]:
goto <bb 7>; [100.00%]
<bb 4> [local count: 332726818]:
if (__len_45 > 4611686018427387903)
goto <bb 17>; [73.39%]
else
goto <bb 5>; [26.61%]
<bb 17> [local count: 244178557]:
goto <bb 7>; [100.00%]
<bb 5> [local count: 88402232]:
if (__len_45 != 0)
goto <bb 18>; [12.88%]
else
goto <bb 19>; [87.12%]
<bb 19> [local count: 77013614]:
goto <bb 8>; [100.00%]
<bb 18> [local count: 11388618]:
<bb 6> [local count: 168541338]:
# __len_21 = PHI <1(15), __len_45(18)>
_69 = __len_21 * 4;
<bb 7> [local count: 761746931]:
# prephitmp_73 = PHI <18446744073709551612(16), _69(6), 18446744073709551612(17)>
# .MEM_55 = VDEF <.MEM_3(D)>
_34 = operator new (prephitmp_73);
_82 = _34 + prephitmp_73;
<bb 8> [local count: 1073007506]:
# iftmp.60_35 = PHI <_34(7), 0B(19)>
# .MEM_47 = PHI <.MEM_55(7), .MEM_3(D)(19)>
# prephitmp_86 = PHI <_82(7), 0B(19)>
_1 = (long unsigned int) _65;
_2 = iftmp.60_35 + _1;
# VUSE <.MEM_47>
_24 = *__args#0_15(D);
# .MEM_29 = VDEF <.MEM_47>
*_2 = _24;
_89 = _1 + 4;
_88 = iftmp.60_35 + _89;
_87 = _37 - __position_10;
_71 = (long unsigned int) _87;
_66 = _88 + _71;
if (__position_10 != _36)
goto <bb 9>; [53.47%]
else
goto <bb 12>; [46.53%]
<bb 9> [local count: 573737113]:
# .MEM_30 = VDEF <.MEM_29>
__builtin_memmove (iftmp.60_35, _36, _1);
if (__position_10 != _37)
goto <bb 20>; [53.47%]
else
goto <bb 21>; [46.53%]
<bb 21> [local count: 266959879]:
<bb 10> [local count: 573737113]:
# .MEM_80 = PHI <.MEM_30(21), .MEM_27(24)>
# .MEM_32 = VDEF <.MEM_80>
operator delete (_36);
goto <bb 14>; [100.00%]
<bb 20> [local count: 306777234]:
<bb 11> [local count: 573737113]:
# .MEM_63 = PHI <.MEM_30(20), .MEM_29(22)>
# .MEM_31 = VDEF <.MEM_63>
__builtin_memcpy (_88, __position_10, _71);
goto <bb 13>; [100.00%]
<bb 12> [local count: 499270392]:
if (__position_10 != _37)
goto <bb 22>; [53.47%]
else
goto <bb 23>; [46.53%]
<bb 22> [local count: 266959878]:
goto <bb 11>; [100.00%]
<bb 23> [local count: 232310514]:
<bb 13> [local count: 806047626]:
# .MEM_27 = PHI <.MEM_31(11), .MEM_29(23)>
if (_36 != 0B)
goto <bb 24>; [38.06%]
else
goto <bb 25>; [61.94%]
<bb 24> [local count: 306777233]:
goto <bb 10>; [100.00%]
<bb 25> [local count: 499270393]:
<bb 14> [local count: 1073007505]:
# .MEM_26 = PHI <.MEM_32(10), .MEM_27(25)>
_59 = (long unsigned int) _66;
_58 = (long unsigned int) iftmp.60_35;
_49 = {_58, _59};
# .MEM_61 = VDEF <.MEM_26>
MEM[(int * *)this_4(D)] = _49;
# .MEM_23 = VDEF <.MEM_61>
this_4(D)->D.120504._M_impl._M_end_of_storage = prephitmp_86;
# VUSE <.MEM_23>
return;
}
;; Function main (main, funcdef_no=5671, decl_uid=163905, cgraph_uid=1053, symbol_order=1185) (executed once)
main ()
{
vector(2) long unsigned int * vectp.440;
vector(2) long unsigned int * {ref-all} vectp_t.439;
long int i$8;
int i$current_$D132271$D131673$D126239$value$value_;
long int i$8;
int i$current_$D132271$D131673$D126239$value$value_;
int * D.184594;
const long unsigned int D.184591;
const size_type __len;
size_type D.184590;
size_type __n;
int * __mid$_M_current;
int * const __position;
int * SR.197;
int * SR.194;
const size_type __elems_after;
const size_type __n;
struct iterator __position;
struct move_iterator __first;
struct move_iterator __last;
struct iterator D.184563;
struct move_iterator __last;
struct move_iterator __first;
struct iterator __pos;
struct const_iterator __position;
struct move_iterator __first;
struct move_iterator __last;
struct common_iterator & D.184552;
struct __normal_iterator D.184549;
int D.184541;
struct common_iterator D.184535;
struct common_iterator D.184534;
struct common_iterator D.184523;
struct common_iterator D.184522;
struct common_iterator & D.184510;
int * const __position;
struct iterator __position;
struct __normal_iterator D.184502;
struct __normal_iterator D.184501;
struct iterator D.184500;
const int * const __position;
struct const_iterator __position;
int * const __pos;
struct iterator D.184491;
struct const_iterator __position;
struct vector __tmp;
struct const_iterator D.184490;
struct move_iterator D.184489;
struct move_iterator D.184488;
struct iterator D.184487;
struct common_iterator D.184486;
struct common_iterator D.184485;
value_type D.184484;
struct iterator __pos;
struct common_iterator D.184469;
struct common_iterator D.184468;
struct iterator __pos;
struct common_iterator D.184458;
struct common_iterator D.184457;
struct __normal_iterator D.184456;
struct iterator D.184455;
struct const_iterator __position;
struct iterator D.184446;
int * const __first;
int * const __last;
struct iterator __first;
struct iterator __last;
struct common_iterator & D.184437;
bool D.184403;
bool D.184388;
int * __cur$_M_current;
struct iterator D.184383;
struct __normal_iterator D.184382;
struct __normal_iterator D.184381;
struct counted_iterator i;
struct counted_iterator i;
struct common_iterator __last;
struct common_iterator __first;
struct const_iterator D.184380;
struct common_iterator D.184379;
struct common_iterator D.184378;
struct iterator D.184377;
struct I D.184376;
struct I D.184375;
int D.184374;
struct testype t;
int g.0_1;
int * _7;
long int _16;
bool _22;
int * _29;
int * _41;
int * _42;
long int _43;
long int _44;
int _45;
bool _101;
long int _103;
int _106;
int * _107;
int * _126;
int * _128;
int _146;
long int _147;
long int _270;
bool _306;
int * _356;
<bb 2> [local count: 1073741826]:
# .MEM_10 = VDEF <.MEM_2(D)>
MEM[(struct &)&t] ={v} {CLOBBER};
# .MEM_367 = VDEF <.MEM_10>
MEM[(int * *)&t] = { 0, 0 };
# .MEM_13 = VDEF <.MEM_367>
MEM[(struct _Vector_impl *)&t]._M_end_of_storage = 0B;
# VUSE <.MEM_13>
g.0_1 = g;
_16 = (long int) g.0_1;
# .MEM_304 = VDEF <.MEM_13>
MEM[(struct &)&__first] ={v} {CLOBBER};
# .MEM_305 = VDEF <.MEM_304>
MEM[(struct &)&__first] ={v} {CLOBBER};
# .MEM_280 = VDEF <.MEM_305>
MEM[(struct counted_iterator *)&i] = 0;
# .MEM_275 = VDEF <.MEM_280>
MEM[(struct counted_iterator *)&i + 8B] = _16;
# .MEM_308 = VDEF <.MEM_275>
MEM[(struct indexed_datum *)&__first].datum_ = i;
# .MEM_309 = VDEF <.MEM_308>
MEM[(struct variant *)&__first].index_ = 0;
# .MEM_310 = VDEF <.MEM_309>
MEM[(struct &)&__last] ={v} {CLOBBER};
# .MEM_311 = VDEF <.MEM_310>
MEM[(struct &)&__last] ={v} {CLOBBER};
# .MEM_312 = VDEF <.MEM_311>
MEM[(struct &)&__last] ={v} {CLOBBER};
# .MEM_313 = VDEF <.MEM_312>
MEM[(struct variant *)&__last].index_ = 1;
# .MEM_314 = VDEF <.MEM_313>
MEM[(struct &)&D.184375] ={v} {CLOBBER};
# .MEM_315 = VDEF <.MEM_314>
MEM[(struct &)&D.184375] ={v} {CLOBBER};
# .MEM_316 = VDEF <.MEM_315>
MEM[(struct &)&D.184375] ={v} {CLOBBER};
# .MEM_317 = VDEF <.MEM_316>
MEM[(struct variant *)&D.184375].index_ = 1;
# .MEM_318 = VDEF <.MEM_317>
MEM[(struct &)&D.184376] ={v} {CLOBBER};
# .MEM_319 = VDEF <.MEM_318>
MEM[(struct &)&D.184376] ={v} {CLOBBER};
# .MEM_368 = VDEF <.MEM_319>
MEM[(struct counted_iterator *)&i] = 0;
# .MEM_369 = VDEF <.MEM_368>
MEM[(struct counted_iterator *)&i + 8B] = _16;
# .MEM_322 = VDEF <.MEM_369>
MEM[(struct indexed_datum *)&D.184376].datum_ = i;
# .MEM_323 = VDEF <.MEM_322>
MEM[(struct variant *)&D.184376].index_ = 0;
# .MEM_324 = VDEF <.MEM_323>
testype::assign2<ranges::v3::common_iterator<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel> > (&t, &D.184376, &D.184375);
<bb 3> [local count: 1073312330]:
# .MEM_325 = VDEF <.MEM_324>
D.184376 ={v} {CLOBBER};
# .MEM_326 = VDEF <.MEM_325>
D.184375 ={v} {CLOBBER};
# VUSE <.MEM_326>
_270 = MEM[(long int *)&__first + 8B];
if (_270 == 0)
goto <bb 5>; [3.66%]
else
goto <bb 4>; [96.34%]
<bb 4> [local count: 1033483203]:
# VUSE <.MEM_326>
_356 = MEM[(int * const &)&t + 8];
if (_356 != 0B)
goto <bb 25>; [0.00%]
else
goto <bb 24>; [100.00%]
<bb 5> [local count: 531768637]:
# VUSE <.MEM_326>
_22 = ranges::v3::operator==<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel, ranges::v3::default_sentinel> (&__first, &__last);
if (_22 != 0)
goto <bb 6>; [45.35%]
else
goto <bb 26>; [54.65%]
<bb 6> [local count: 241181225]:
# VUSE <.MEM_326>
_29 = MEM[(int * const &)&t + 8];
if (_29 != 0B)
goto <bb 7>; [100.00%]
else
goto <bb 27>; [0.00%]
<bb 27> [local count: 0]:
goto <bb 8>; [100.00%]
<bb 7> [local count: 241181232]:
# .MEM_344 = VDEF <.MEM_326>
MEM[(int * *)&t + 8B] = 0B;
<bb 8> [local count: 344544606]:
# .MEM_271 = PHI <.MEM_344(7), .MEM_326(27), .MEM_326(31)>
# .MEM_347 = VDEF <.MEM_271>
__first ={v} {CLOBBER};
# .MEM_348 = VDEF <.MEM_347>
__last ={v} {CLOBBER};
goto <bb 17>; [100.00%]
<bb 26> [local count: 290587410]:
<bb 9> [local count: 699529968]:
# .MEM_349 = VDEF <.MEM_326>
MEM[(struct &)&D.184378] ={v} {CLOBBER};
# .MEM_350 = VDEF <.MEM_349>
MEM[(struct &)&D.184378] ={v} {CLOBBER};
# .MEM_353 = VDEF <.MEM_350>
MEM[(struct &)&D.184379] ={v} {CLOBBER};
# .MEM_354 = VDEF <.MEM_353>
MEM[(struct &)&D.184379] ={v} {CLOBBER};
# .MEM_355 = VDEF <.MEM_354>
MEM[(struct Head *)&D.184379] = MEM[(const struct indexed_datum *)&__first];
# .MEM_357 = VDEF <.MEM_355>
MEM[(struct &)&D.184380] ={v} {CLOBBER};
# .MEM_360 = VDEF <.MEM_357>
MEM[(struct &)&D.184458] ={v} {CLOBBER};
# .MEM_361 = VDEF <.MEM_360>
MEM[(struct &)&D.184458] ={v} {CLOBBER};
# .MEM_364 = VDEF <.MEM_361>
MEM[(struct &)&D.184457] ={v} {CLOBBER};
# .MEM_365 = VDEF <.MEM_364>
MEM[(struct &)&D.184457] ={v} {CLOBBER};
# .MEM_366 = VDEF <.MEM_365>
MEM[(struct Head *)&D.184457] = MEM[(const struct indexed_datum *)&D.184379];
# .MEM_370 = VDEF <.MEM_366>
MEM[(struct &)&D.184468] ={v} {CLOBBER};
# .MEM_371 = VDEF <.MEM_370>
MEM[(struct &)&D.184468] ={v} {CLOBBER};
# .MEM_373 = VDEF <.MEM_371>
MEM[(struct variant *)&D.184468].index_ = 1;
# .MEM_374 = VDEF <.MEM_373>
MEM[(struct &)&D.184469] ={v} {CLOBBER};
# .MEM_375 = VDEF <.MEM_374>
MEM[(struct &)&D.184469] ={v} {CLOBBER};
# .MEM_376 = VDEF <.MEM_375>
MEM[(struct Head *)&D.184469] = MEM[(const struct indexed_datum *)&D.184457];
# .MEM_377 = VDEF <.MEM_376>
MEM[(struct variant *)&D.184469].index_ = 0;
<bb 10> [local count: 5759776984]:
# .MEM_276 = PHI <.MEM_399(15), .MEM_377(9)>
# VUSE <.MEM_276>
_101 = ranges::v3::operator==<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel, ranges::v3::default_sentinel> (&D.184469, &D.184468);
if (_101 != 0)
goto <bb 16>; [5.50%]
else
goto <bb 11>; [94.50%]
<bb 11> [local count: 5440812053]:
# VUSE <.MEM_276>
_103 = MEM[(struct counted_iterator *)&D.184469].cnt_;
# VUSE <.MEM_276>
_106 = MEM[(int *)&D.184469];
# .MEM_379 = VDEF <.MEM_276>
D.184484 = _106;
# VUSE <.MEM_379>
_107 = MEM[(int * const &)&t + 8];
# VUSE <.MEM_379>
_126 = MEM[(struct vector *)&t].D.120504._M_impl._M_end_of_storage;
if (_107 != _126)
goto <bb 12>; [82.57%]
else
goto <bb 13>; [17.43%]
<bb 12> [local count: 2089514116]:
# .MEM_382 = VDEF <.MEM_379>
*_107 = _106;
_128 = _107 + 4;
# .MEM_383 = VDEF <.MEM_382>
MEM[(struct vector *)&t].D.120504._M_impl._M_finish = _128;
goto <bb 15>; [100.00%]
<bb 13> [local count: 947954213]:
# .MEM_391 = VDEF <.MEM_379>
MEM[(struct __normal_iterator *)&D.184501] = _107;
# .MEM_392 = VDEF <.MEM_391>
std::vector<int>::_M_realloc_insert<int> (&t.D.120557, D.184501, &D.184484);
goto <bb 28>; [100.00%]
<bb 14> [count: 0]:
<L11>:
goto <bb 21>; [100.00%]
<bb 28> [local count: 947954213]:
<bb 15> [local count: 5438635723]:
# .MEM_283 = PHI <.MEM_383(12), .MEM_392(28)>
# .MEM_395 = VDEF <.MEM_283>
__position ={v} {CLOBBER};
# .MEM_396 = VDEF <.MEM_395>
__position ={v} {CLOBBER};
# .MEM_397 = VDEF <.MEM_396>
D.184484 ={v} {CLOBBER};
_146 = _106 + 1;
# .MEM_398 = VDEF <.MEM_397>
MEM[(int *)&D.184469] = _146;
_147 = _103 + -1;
# .MEM_399 = VDEF <.MEM_398>
MEM[(struct counted_iterator *)&D.184469].cnt_ = _147;
goto <bb 10>; [100.00%]
<bb 16> [local count: 685796794]:
# .MEM_511 = VDEF <.MEM_276>
__pos ={v} {CLOBBER};
# .MEM_512 = VDEF <.MEM_511>
D.184469 ={v} {CLOBBER};
# .MEM_513 = VDEF <.MEM_512>
D.184468 ={v} {CLOBBER};
# .MEM_514 = VDEF <.MEM_513>
__pos ={v} {CLOBBER};
# .MEM_515 = VDEF <.MEM_514>
D.184457 ={v} {CLOBBER};
# .MEM_516 = VDEF <.MEM_515>
D.184458 ={v} {CLOBBER};
# .MEM_519 = VDEF <.MEM_516>
__position ={v} {CLOBBER};
# .MEM_520 = VDEF <.MEM_519>
D.184380 ={v} {CLOBBER};
# .MEM_521 = VDEF <.MEM_520>
D.184379 ={v} {CLOBBER};
# .MEM_522 = VDEF <.MEM_521>
D.184378 ={v} {CLOBBER};
<bb 17> [local count: 1030341413]:
# .MEM_269 = PHI <.MEM_348(8), .MEM_522(16)>
# VUSE <.MEM_269>
_41 = MEM[(int * *)&t];
# VUSE <.MEM_269>
_42 = MEM[(int * *)&t + 8B];
_43 = _42 - _41;
_44 = _43 /[ex] 4;
_45 = (int) _44;
# .MEM_523 = VDEF <.MEM_269>
__first ={v} {CLOBBER};
# .MEM_524 = VDEF <.MEM_523>
__last ={v} {CLOBBER};
if (_41 != 0B)
goto <bb 18>; [53.47%]
else
goto <bb 29>; [46.53%]
<bb 29> [local count: 479417861]:
goto <bb 19>; [100.00%]
<bb 18> [local count: 550923549]:
# .MEM_14 = VDEF <.MEM_524>
operator delete (_41);
<bb 19> [local count: 1030341413]:
# .MEM_8 = PHI <.MEM_14(18), .MEM_524(29)>
# .MEM_5 = VDEF <.MEM_8>
t ={v} {CLOBBER};
# VUSE <.MEM_5>
return _45;
<bb 20> [count: 0]:
<L10>:
<bb 21> [count: 0]:
# .MEM_265 = PHI <.MEM_324(20), .MEM_392(14)>
<L3>:
# VUSE <.MEM_265>
_7 = MEM[(struct vector *)&t].D.120504._M_impl._M_start;
if (_7 != 0B)
goto <bb 22>; [0.00%]
else
goto <bb 30>; [0.00%]
<bb 30> [count: 0]:
goto <bb 23>; [100.00%]
<bb 22> [count: 0]:
# .MEM_15 = VDEF <.MEM_265>
operator delete (_7);
<bb 23> [count: 0]:
resx 2
<bb 24> [local count: 512305937]:
# VUSE <.MEM_326>
_306 = ranges::v3::operator==<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel, ranges::v3::default_sentinel> (&__first, &__last);
if (_306 != 0)
goto <bb 31>; [20.18%]
else
goto <bb 32>; [79.82%]
<bb 32> [local count: 408942556]:
goto <bb 9>; [100.00%]
<bb 31> [local count: 103363381]:
goto <bb 8>; [100.00%]
<bb 25> [count: 0]:
# .MEM_345 = VDEF <.MEM_326>
MEM[(int &)0B] ={v} 0;
# .MEM_123 = VDEF <.MEM_345>
__builtin_trap ();
}
;; Function _GLOBAL__sub_I_main (_GLOBAL__sub_I_main, funcdef_no=6560, decl_uid=179675, cgraph_uid=1936, symbol_order=4428) (executed once)
_GLOBAL__sub_I_main ()
{
<bb 2> [local count: 1073741825]:
# .MEM_2 = VDEF <.MEM_1(D)>
std::ios_base::Init::Init (&__ioinit);
# .MEM_3 = VDEF <.MEM_2>
__cxa_atexit (__dt_comp , &__ioinit, &__dso_handle); [tail call]
# VUSE <.MEM_3>
return;
}
// Range v3 library
//
// Copyright Eric Niebler 2014-present
//
// Use, modification and distribution is subject to the
// Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Project home: https://github.com/ericniebler/range-v3
#include <utility> // for std::swap on C++14.
#include <map>
#include <set>
#include <list>
#include <sstream>
#include <string>
#include <vector>
#include <range/v3/core.hpp>
#include <range/v3/view/any_view.hpp>
#include <range/v3/view/concat.hpp>
#include <range/v3/view/drop.hpp>
#include <range/v3/view/take.hpp>
#include <range/v3/view/repeat.hpp>
#include <range/v3/view/reverse.hpp>
#include <range/v3/view/transform.hpp>
#include <range/v3/view/for_each.hpp>
#include <range/v3/view/iota.hpp>
#include <range/v3/view/zip.hpp>
#include "./simple_test.hpp"
#include "./test_utils.hpp"
//int main(int argc, char **argv)
using namespace ranges;
class testype : public std::vector<int>
{
public:
template<typename _InputIterator>
void
assign2(_InputIterator __first, _InputIterator __last)
{ _M_assign_dispatch2(__first, __last, std::__false_type()); }
template<typename _InputIterator>
void
_M_assign_dispatch2(_InputIterator __first, _InputIterator __last,
std::__false_type)
{ _M_assign_aux2(__first, __last, std::__iterator_category(__first)); }
template<typename I1, typename I2, typename S1, typename S2,
CONCEPT_REQUIRES_(Sentinel<S1, I2>() && Sentinel<S2, I1>() &&
!EqualityComparable<I1, I2>())>
bool compareit(common_iterator<I1, S1> const &x, common_iterator<I2, S2> const &y)
{
return detail::cidata(x).index() == 1u ?
(detail::cidata(y).index() == 1u || ranges::get<0>(detail::cidata(y)) == ranges::get<1>(detail::cidata(x))) :
(detail::cidata(y).index() != 1u || ranges::get<0>(detail::cidata(x)) == ranges::get<1>(detail::cidata(y)));
}
template<typename I1, typename I2, typename S1, typename S2,
CONCEPT_REQUIRES_(Sentinel<S1, I2>() && Sentinel<S2, I1>() &&
EqualityComparable<I1, I2>())>
bool compareit(common_iterator<I1, S1> const &x, common_iterator<I2, S2> const &y)
{
return detail::cidata(x).index() == 1u ?
(detail::cidata(y).index() == 1u || ranges::get<0>(detail::cidata(y)) == ranges::get<1>(detail::cidata(x))) :
(detail::cidata(y).index() == 1u ?
ranges::get<0>(detail::cidata(x)) == ranges::get<1>(detail::cidata(y)) :
ranges::get<0>(detail::cidata(x)) == ranges::get<0>(detail::cidata(y)));
}
template<typename _InputIterator>
void
_M_assign_aux2(_InputIterator __first, _InputIterator __last,
std::input_iterator_tag)
{
int* __cur(this->_M_impl._M_start);
for (; __first != __last && __cur != this->_M_impl._M_finish;
++__cur, ++__first)
__cur += *__cur;
if (__first == __last)
_M_erase_at_end(__cur);
}
int func(int argc, char**) {
// 1-d vector
auto rng = view::ints | view::take(argc);
//std::vector<int> ve = rng;
//using I = range_common_iterator_t<decltype(v)>;
//std::vector<int> ve(v);//I{ranges::begin(v)}, I{ranges::end(v)});
//auto ve = to_<std::vector<int>>(v);
//auto ve = static_cast<decltype(v)&&>(v) | detail::to_container_fn<meta::id<std::vector<int>>> {};
//auto tocntvector = detail::to_container_fn<meta::id<std::vector<int>>> {};
//auto ve = tocntvector.operator()<ranges::v3::detail::take_exactly_view_<ranges::v3::view::ints_fn, false>&>(v);
//std::vector<int> c;
using I = range_common_iterator_t<decltype(rng)>;
//c.assign(I{ranges::begin(rng)}, I{ranges::end(rng)});
auto __cur(begin());
ranges::v3::common_iterator<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel> __first(I{ranges::begin(rng)});
ranges::v3::common_iterator<ranges::v3::counted_iterator<ranges::v3::basic_iterator<ranges::v3::iota_view<int> >, void>, ranges::v3::default_sentinel> __last(I{ranges::end(rng)});
//assign(I{ranges::begin(rng)}, I{ranges::end(rng)});
//_M_assign_aux(I{ranges::begin(rng)}, I{ranges::end(rng)}, std::input_iterator_tag());
assign2(I{ranges::begin(rng)}, I{ranges::end(rng)});
for (; __first != __last && __cur != end();
++__cur, ++__first)
*__cur = *__first;
if (__first == __last)
erase(__cur, end());
else
insert(end(), __first, __last);
return size();
}
};
extern int g;
int main() {
testype t;
return t.func(g, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment