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:
parent
1f444077fe
commit
717f805313
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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.
|
||||
|
12
gcc/testsuite/g++.dg/rtti/incomplete1.C
Normal file
12
gcc/testsuite/g++.dg/rtti/incomplete1.C
Normal 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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user