diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-10 07:55:04 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-02-10 07:55:04 +0000 |
commit | 53e6e9ec694d8065e09b5f9ce9283e299db6de99 (patch) | |
tree | fbc399be50272a1aa560693806cff14985e9e702 /gcc/cp/call.c | |
parent | a26887aa8022cbe368df1abc83300acf11b90952 (diff) | |
download | gcc-53e6e9ec694d8065e09b5f9ce9283e299db6de99.tar.gz |
PR c++/19811
* call.c (build_op_delete_call): Check COMPLETE_TYPE_P before
attempting name lookup.
PR c++/19811
* g++.dg/init/delete1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94799 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 5d931c8b6e3..4655430a2bd 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -3924,7 +3924,9 @@ build_op_delete_call (enum tree_code code, tree addr, tree size, fnname = ansi_opname (code); - if (IS_AGGR_TYPE (type) && !global_p) + if (CLASS_TYPE_P (type) + && COMPLETE_TYPE_P (complete_type (type)) + && !global_p) /* In [class.free] If the result of the lookup is ambiguous or inaccessible, or if |