From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32333 invoked by alias); 19 Oct 2007 21:10:16 -0000 Received: (qmail 32253 invoked by uid 48); 19 Oct 2007 21:10:04 -0000 Date: Fri, 19 Oct 2007 21:10:00 -0000 Message-ID: <20071019211004.32252.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/29209] ICE optimizing passing long double to abstract method while in other abstract's impl In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "tbm at cyrius dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-10/txt/msg01726.txt.bz2 ------- Comment #9 from tbm at cyrius dot com 2007-10-19 21:10 ------- (In reply to comment #8) > Whether or not an ICE occurs depends to some extent > on checking being enabled. With checking enabled, I see this on 4.1 > and the trunk. > > The ICE is here: > > result = expand_expr (exp, target, tmode, > modifier == EXPAND_INITIALIZER > ? EXPAND_INITIALIZER : EXPAND_CONST_ADDRESS); > > /* If the DECL isn't in memory, then the DECL wasn't properly > marked TREE_ADDRESSABLE, which will be either a front-end > or a tree optimizer bug. */ > gcc_assert (MEM_P (result)); Julien Cristau just reported an ICE with gcc 4.2 on hppa and I tracked it down to the same piece of quote you're quoting above. Note that my reduced testcase produces an ICE with gcc 4.1, 4.2 and trunk. Dave, can you take a look at it please? The following testcase requires -O: paer% gcc-4.2 -c -O2 basematrix.cc basematrix.cc: In member function ‘void S_BaseMatrix >::_ZTv0_n12_N12S_BaseMatrixI7complexIdEE12MultTransAddES1_(Complex)’: basematrix.cc:33: internal compiler error: in expand_expr_addr_expr_1, at expr.c:6554 Please submit a full bug report, with preprocessed source if appropriate. Testcase: /* Testcase by Martin Michlmayr */ template < typename _CharT > class basic_stringstream; typedef basic_stringstream < char >stringstream; template < typename _CharT > class basic_ios { }; template < typename _CharT > class basic_stringstream: virtual public basic_ios < _CharT > { }; template < typename _Tp > class complex; template <> struct complex { __complex__ double _M_value; }; typedef complex < double >Complex; class BaseMatrix { virtual void MultTransAdd (Complex s); }; template < typename SCAL > class S_BaseMatrix:virtual public BaseMatrix { }; template < > class S_BaseMatrix < Complex >:virtual public BaseMatrix { virtual void MultTransAdd (Complex s); }; void S_BaseMatrix < Complex >::MultTransAdd (Complex s) { stringstream err; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29209