This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: Allocate implicit constructors lazily
Mark Mitchell wrote:
Gerald Pfeifer wrote:
% gccvs tmp/8361.ii
In file included from dl.h:165,
from generate.C:7:
dltypes.h: In function `std::ostream& operator<<(std::ostream&, const
ATOM&)':
dltypes.h:742: internal compiler error: Segmentation fault
Seen on i386-linux-gnu and i386-unknown-freebsd4.9 for the last two days,
at least.
Nathan, I think this is one of yours -- it's crashing on a NULL binfo.
Should get_template_base just be returning NULL if arg_binfo is NULL?
yes, an incomplete(able) type has no binfo. Fixed thusly.
built & tested on i686-pc-linux-gnu, installed.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (get_template_base): Check type is completable.
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.894
diff -c -3 -p -r1.894 pt.c
*** cp/pt.c 21 Jul 2004 00:13:36 -0000 1.894
--- cp/pt.c 22 Jul 2004 12:47:09 -0000
*************** get_template_base (tree tparms, tree tar
*** 9458,9463 ****
--- 9458,9467 ----
my_friendly_assert (IS_AGGR_TYPE_CODE (TREE_CODE (arg)), 92);
arg_binfo = TYPE_BINFO (complete_type (arg));
+ if (!arg_binfo)
+ /* The type could not be completed. */
+ return NULL_TREE;
+
rval = get_template_base_recursive (tparms, targs,
parm, arg_binfo,
NULL_TREE,
// { dg-do compile }
// Copyright (C) 2004 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 22 Jul 2004 <nathan@codesourcery.com>
// ICE with incompletable type.
class INC;
template <typename T> class B {};
template<typename T> void Foo (B<T> &);
void Foo (INC &);
void Baz (INC *p)
{
Foo (*p);
}