re PR c++/28109 (ICE with typeid of incomplete type)

PR c++/28109
	* rtti.c (get_tinfo_decl_dynamic): Robustify.

	* g++.dg/rtti/incomplete1.C: New test.

From-SVN: r114882
This commit is contained in:
Volker Reichelt 2006-06-22 09:28:02 +00:00 committed by Volker Reichelt
parent 1f444077fe
commit 717f805313
4 changed files with 23 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28109
* rtti.c (get_tinfo_decl_dynamic): Robustify.
2006-06-20 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28052

View File

@ -228,7 +228,7 @@ get_tinfo_decl_dynamic (tree exp)
tree type;
tree t;
if (exp == error_mark_node)
if (error_operand_p (exp))
return error_mark_node;
/* peel back references, so they match. */

View File

@ -1,3 +1,8 @@
2006-06-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/28109
* g++.dg/rtti/incomplete1.C: New test.
2006-06-21 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_unchecked_conversion.ad[bs]: New test.

View File

@ -0,0 +1,12 @@
// PR c++/28109
// { dg-do compile }
#include <typeinfo>
struct A;
void foo()
{
A a; // { dg-error "incomplete type" }
typeid (a);
}