Commit 3d7e9ba4 by Nathan Sidwell Committed by Nathan Sidwell

semantics.c (finish_id_expr): If type is error_mark, return error_mark.

cp:
	* semantics.c (finish_id_expr): If type is error_mark, return
	error_mark.
testsuite:
	* g++.other/crash24.C: Adjust and remove XFAIL.
	* g++.other/crash37.C: New test.

From-SVN: r37702
parent f4f6bd8d
2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
* semantics.c (finish_id_expr): If type is error_mark, return
error_mark.
2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (lookup_template_class): Simplify loop exit constructs.
......
......@@ -1534,6 +1534,8 @@ finish_id_expr (expr)
if (TREE_CODE (expr) == IDENTIFIER_NODE)
expr = do_identifier (expr, 1, NULL_TREE);
if (TREE_TYPE (expr) == error_mark_node)
expr = error_mark_node;
return expr;
}
......
2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
* g++.other/crash24.C: Adjust and remove XFAIL.
* g++.other/crash37.C: New test.
2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/instantiate9.C: New test.
......
// Build don't link:
// Origin: Jakub Jelinek <jakub@redhat.com>
// crash test - XFAIL *-*-*
#include <iostream>
class foo {
public:
class __iterator;
......@@ -16,6 +12,6 @@ class foo {
static void iteratorTest(const foo &x)
{
foo::const_iterator i = x.begin(); // ERROR -
for (; i; ++i) // ERROR -
cout << *i;
for (; i; ++i)
*i;
}
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 23 Nov 2000 <nathan@codesourcery.com>
// bug 706. We iced when meeting a decl with type error-mark-node
class bifstream;
int main()
{
bifstream bifs; // ERROR - incomplete type
if (!bifs)
{
}
return 0;
}
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