[Bug middle-end/41623] [4.3 Regression] ICE: emit_move_insn at expr.c 3162 when compiling template code.
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Oct 7 19:03:00 GMT 2009
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-10-07 19:03 -------
Confirmed. Reduced testcase:
#include <iostream>
#include <vector>
template< class Iter, class Aggregator >
inline typename Aggregator::value_type
aggregate( Iter first, Iter second, Aggregator p_arg ) {
};
template< class A, class V > struct sum_equals {
typedef V value_type;
};
template< class FUNC > class unary_aggregator {
public:
typedef FUNC functor_type;
typedef typename functor_type::value_type value_type;
unary_aggregator( const value_type & p_init = value_type(),
const functor_type & p_func = functor_type() )
:m_value(p_init), m_functor(p_func){
}
value_type m_value;
functor_type m_functor;
};
template< class A, class V > struct accumulate
: public unary_aggregator< sum_equals< A, V > > {
accumulate( const V & p_arg = V() )
:unary_aggregator< sum_equals< A, V > >( p_arg ){
}
};
int main( int, char ** ) {
std::vector< float > c_args(3);
std::cout << aggregate( c_args.begin(), c_args.end(),
accumulate<float, float>(0) ) << std::endl;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Known to fail| |4.3.4
Known to work| |3.4.6 4.4.1 4.5.0
Last reconfirmed|0000-00-00 00:00:00 |2009-10-07 19:03:07
date| |
Summary|ICE: emit_move_insn at |[4.3 Regression] ICE:
|expr.c 3162 when compiling |emit_move_insn at expr.c
|template code. |3162 when compiling template
| |code.
Target Milestone|--- |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41623
More information about the Gcc-bugs
mailing list