re PR c++/10026 (ICE on incomplete type)

cp:
	PR c++/10026
	* decl2.c (arg_assoc_type) [ERROR_MARK]: Don't die.
testsuite:
	PR c++/10026
	* g++.dg/lookup/koenig1.C: New test.

	PR C++/10199
	* g++.dg/lookup/template2.C: New test.

From-SVN: r64809
This commit is contained in:
Nathan Sidwell 2003-03-24 18:20:12 +00:00
parent f89283915d
commit 2ef6c975b9
5 changed files with 65 additions and 5 deletions

View file

@ -1,7 +1,13 @@
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10026
* decl2.c (arg_assoc_type) [ERROR_MARK]: Don't die.
2003-03-23 Mark Mitchell <mark@codesourcery.com>
PR c++/7086
* typeck.c (cxx_mark_addressable): Likewise.
* typeck.c (cxx_mark_addressable): Adjust call to
gen_mem_addressof or put_var_into_stack.
2003-03-22 Nathan Sidwell <nathan@codesourcery.com>
@ -647,10 +653,10 @@
2003-02-26 Devang Patel <dpatel@apple.com>
* decl.c (finish_enum): Merge two 'for' loops. Copy value node if required.
Postpone enum setting for template decls.
(build_enumerator): Delay copying value node until finish_enum (). Remove
#if 0'ed code.
* decl.c (finish_enum): Merge two 'for' loops. Copy value node if
required. Postpone enum setting for template decls.
(build_enumerator): Delay copying value node until finish_enum
(). Remove #if 0'ed code.
* pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
(tsubst_copy): Add check for enum type.

View file

@ -3986,6 +3986,8 @@ arg_assoc_type (struct arg_lookup *k, tree type)
{
switch (TREE_CODE (type))
{
case ERROR_MARK:
return false;
case VOID_TYPE:
case INTEGER_TYPE:
case REAL_TYPE:

View file

@ -1,3 +1,11 @@
2003-03-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/10026
* g++.dg/lookup/koenig1.C: New test.
PR C++/10199
* g++.dg/lookup/template2.C: New test.
2003-03-24 Jakub Jelinek <jakub@redhat.com>
* g++.dg/opt/rtti1.C: New test.

View file

@ -0,0 +1,13 @@
// { dg-do compile }
// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 24 Mar 2003 <nathan@codesourcery.com>
// PR 10026. We ICE'd
class X;
void foo() {
X x(1); // { dg-error "incomplete type" "" }
bar(x); // { dg-error "undeclared" "" }
}

View file

@ -0,0 +1,31 @@
// { dg-do compile }
// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 24 Mar 2003 <nathan@codesourcery.com>
// PR 10199. Lookup problems
class X {
public:
template<int d>
int bar ();
};
template<int x>
int fooo ();
template<class T>
void bar (T& g)
{
int kk = fooo<17>(); // OK
X x;
int k = x.bar<17>(); // Not OK
}
int main ()
{
X x;
int k=x.bar<17>(); // OK
int n;
bar(n);
}