https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69336
ktkachov at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktkachov at gcc dot gnu.org
--- Comment #9 from ktkachov at gcc dot gnu.org ---
(In reply to Richard Biener from comment #6)
>
> * g++.dg/tree-ssa/pr69336.C: New testcase.
This testcase fails for me on arm-none-eabi.
The optimized dump on -std=c++14 -O3 -fdump-tree-optimized -std=c++14 contains:
int main() ()
{
size_t n;
const struct static_map cmap;
const char * _4;
int _5;
int _11;
void * _15;
int _25;
<bb 2>:
cmap = *.LC3;
_5 = cmap._values[0].second.first;
if (_5 == 8)
goto <bb 5>;
else
goto <bb 3>;
<bb 3>:
_25 = cmap._values[1].second.first;
if (_25 == 8)
goto <bb 5>;
else
goto <bb 4>;
<bb 4>:
_11 = cmap._values[2].second.first;
if (_11 == 8)
goto <bb 5>;
else
goto <bb 6>;
<bb 5>:
# n_8 = PHI <2(4), 0(2), 1(3)>
_4 = MEM[(const char * const &)&cmap]._values[n_8].second.second;
if (_4 == 0B)
goto <bb 9>;
else
goto <bb 10>;
<bb 6>:
_15 = __cxa_allocate_exception (8);
std::out_of_range::out_of_range (_15, "Key not found");
<bb 7>:
__cxa_throw (_15, &_ZTISt12out_of_range, __comp_dtor );
<L6>:
__cxa_free_exception (_15);
__builtin_cxa_end_cleanup ();
<bb 9>:
abort ();
<bb 10>:
cmap ={v} {CLOBBER};
return 0;
}