Commit 42611590 by Nathan Sidwell Committed by Nathan Sidwell

* pt.c

cp:
        * pt.c  (get_template_base): Check type is completable.
testsuite:
        * g++.dg/template/crash20.c: New.

From-SVN: r85050
parent 4f5492cd
2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (get_template_base): Check type is completable.
2004-07-21 Eric Christopher <echristo@redhat.com>
* decl.c (poplevel): Inline unused variable checking.
......
......@@ -9458,6 +9458,10 @@ get_template_base (tree tparms, tree targs, tree parm, tree arg)
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,
......
2004-07-22 Nathan Sidwell <nathan@codesourcery.com>
* g++.dg/template/crash20.c: New.
2004-07-22 David Billinghurst (David.Billinghurst@riotinto.com)
* gfortran.dg/g77/970625-2.f Copy from g77.f-torture/execute.
......
// { 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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment