Commit 0efc4442 by Dodji Seketeli Committed by Dodji Seketeli

re PR c++/38636 (ICE with broken ctor declaration)

gcc/cp/ChangeLog:
2009-01-13  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38636
	* name-lookup.c (pushtag): Don't create members to types that are not
	being created.

gcc/testsuite/ChangeLog:
2009-01-13  Dodji Seketeli  <dodji@redhat.com>

	PR c++/38636
	* g++.dg/parse/crash50.C: New test.

From-SVN: r143392
parent 0196c95e
2009-01-15 Dodji Seketeli <dodji@redhat.com>
PR c++/38636
* name-lookup.c (pushtag): Don't create members to types that are not
being created.
2009-01-14 Nick Clifton <nickc@redhat.com> 2009-01-14 Nick Clifton <nickc@redhat.com>
PR c++/37862 PR c++/37862
......
...@@ -5109,6 +5109,9 @@ pushtag (tree name, tree type, tag_scope scope) ...@@ -5109,6 +5109,9 @@ pushtag (tree name, tree type, tag_scope scope)
if (b->kind == sk_class) if (b->kind == sk_class)
{ {
if (!TYPE_BEING_DEFINED (current_class_type))
POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);
if (!PROCESSING_REAL_TEMPLATE_DECL_P ()) if (!PROCESSING_REAL_TEMPLATE_DECL_P ())
/* Put this TYPE_DECL on the TYPE_FIELDS list for the /* Put this TYPE_DECL on the TYPE_FIELDS list for the
class. But if it's a member template class, we want class. But if it's a member template class, we want
......
2009-01-15 Dodji Seketeli <dodji@redhat.com>
PR c++/38636
* g++.dg/parse/crash50.C: New test.
2009-01-14 Jakub Jelinek <jakub@redhat.com> 2009-01-14 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/38245 PR rtl-optimization/38245
......
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/38636
// { dg-do compile }
struct A; // { dg-error "forward declaration of 'struct A'" }
A::A(
struct B; // { dg-error "expected '\\)' before ';' token|invalid use of incomplete type 'struct A'" }
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