Commit 2ef6c975 by Nathan Sidwell

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
parent f8928391
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.
......
......@@ -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:
......
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.
......
// { 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" "" }
}
// { 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);
}
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