http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137
Alexander Dubov <oakad at yahoo dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |oakad at yahoo dot com
--- Comment #14 from Alexander Dubov <oakad at yahoo dot com> 2012-11-29
15:31:46 UTC ---
Because this bug is so annoying, I thought it may be helpful if I add an
another example:
(clang-3.1 works in all cases)
template <typename value_type>
struct test {
test(std::initializer_list<value_type> l)
{
insert(l.begin(), l.end());
}
template <typename input_iter_t>
void insert(input_iter_t first, input_iter_t last)
{
std::for_each(
first, last, [this](value_type const &v) -> void {
// works on both gcc-4.6.3 and gcc-4.7.2
this->insert(v);
// won't compile on 4.6.3,
// ICE at tree-ssa-operands.c:1035 on 4.7.2
insert(v);
}
);
}
void insert(value_type const &v)
{
std::cout << v << std::endl;
}
};