Commit 2c92b94d by Nathan Sidwell Committed by Nathan Sidwell

call.c (build_over_call): Use VOID_TYPE_P.

cp:
	* call.c (build_over_call): Use VOID_TYPE_P. Don't die on
	incomplete return type.
testsuite:
	* g++.old-deja/g++.other/crash38.C: New test.

From-SVN: r37872
parent 47f18b4f
2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
* call.c (build_over_call): Use VOID_TYPE_P. Don't die on
incomplete return type.
2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (base_class.1): Produce a _TYPE not a _DECL.
......
......@@ -4189,9 +4189,11 @@ build_over_call (cand, args, flags)
}
fn = fold (build_call (fn, converted_args));
if (TREE_CODE (TREE_TYPE (fn)) == VOID_TYPE)
if (VOID_TYPE_P (TREE_TYPE (fn)))
return fn;
fn = require_complete_type (fn);
if (fn == error_mark_node)
return error_mark_node;
if (IS_AGGR_TYPE (TREE_TYPE (fn)))
fn = build_cplus_new (TREE_TYPE (fn), fn);
return convert_from_reference (fn);
......
2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.other/crash38.C: New test.
2000-11-29 Toon Moene <toon@moene.indiv.nluug.nl>
* g77.f-torture/execute/20001111.x: Test fixed - remove XFAIL.
......
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 28 Nov 2000 <nathan@codesourcery.com>
// Bug 611. We ICEd when calling a member function returning an incomplete
// type by value.
struct X; // ERROR - forward ref
struct Y
{
X foo ();
};
void baz (Y *p)
{
p->foo (); // ERROR - incomplete
}
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