public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/17842] New: internal compiler error: in write_type, at cp/mangle.c:1646
@ 2004-10-05 14:19 dkouroun at mailbox dot gr
  2004-10-05 14:22 ` [Bug c++/17842] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: dkouroun at mailbox dot gr @ 2004-10-05 14:19 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/17842] internal compiler error: in write_type, at cp/mangle.c:1646
  2004-10-05 14:19 [Bug c++/17842] New: internal compiler error: in write_type, at cp/mangle.c:1646 dkouroun at mailbox dot gr
@ 2004-10-05 14:22 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-05 14:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-05 14:22 -------


*** This bug has been marked as a duplicate of 13740 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17842


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-05 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-05 14:19 [Bug c++/17842] New: internal compiler error: in write_type, at cp/mangle.c:1646 dkouroun at mailbox dot gr
2004-10-05 14:22 ` [Bug c++/17842] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).