[Bug c++/17842] New: internal compiler error: in write_type, at cp/mangle.c:1646
dkouroun at mailbox dot gr
gcc-bugzilla@gcc.gnu.org
Tue Oct 5 14:19:00 GMT 2004
The code crashes in that function
Basically all the versions of g++ until current 4.0 do not know how to handle
template<typename L, typename R> inline
FExpr<ExprOp< typeof( dx(L()) ),
typeof( dx(R()) ),
Add<typename ResultType<L,R>::Type>
> >
-------------------------------------------------------------
template<typename L, typename R> inline
FExpr<ExprOp< typeof( dx(L()) ),
typeof( dx(R()) ),
Add<typename ResultType<L,R>::Type>
> >
dx(const FExpr<ExprOp<L, R, Add<typename ResultType<L, R>::Type> > >& rF)
{
typedef typename ResultType<L, R>::Type Type;
ExprOp<L, R, Add<Type> > expr_op = rF.GetExpr();
L l_ = expr_op.GetL();
R r_ = expr_op.GetR();
typedef typeof( dx(l_) ) dxTypeL;
typedef typeof( dx(r_) ) dxTypeR;
dxTypeL dxl_ = dx(l_);
dxTypeR dxr_ = dx(r_);
typedef ExprOp<dxTypeL, dxTypeR, Add<Type> > dxOpType;
return FExpr<dxOpType>( dxOpType(dxl_, dxr_) );
}
-------------------------------------------------------------
That is critical for auto-differentiation code; auto/decltype would be an easy
workaround but at the moment typeof is the only option I have here!
--
Summary: internal compiler error: in write_type, at
cp/mangle.c:1646
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dkouroun at mailbox dot gr
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17842
More information about the Gcc-bugs
mailing list