* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37702
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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;
static void iteratorTest(const foo &x)
{
foo::const_iterator i = x.begin(); // ERROR -
- for (; i; ++i) // ERROR -
- cout << *i;
+ for (; i; ++i)
+ *i;
}
--- /dev/null
+// 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;
+}