This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52088] New: [4.7 Regression] ICE in "delete" with template convertion operator
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 02 Feb 2012 00:53:51 +0000
- Subject: [Bug c++/52088] New: [4.7 Regression] ICE in "delete" with template convertion operator
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52088
Bug #: 52088
Summary: [4.7 Regression] ICE in "delete" with template
convertion operator
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: lto
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
CC: flast@flast.jp
Depends on: 48491
Blocks: 48490
GCC ICEs with the following testcase
---- testcase.C ----
struct S
{
template < typename T >
operator T *() { return 0; }
};
int main()
{
S s;
delete s;
}
---
GNU C++ (GCC) version 4.7.0 20120123 (experimental) [trunk revision 183458]
(x86_64-unknown-linux-gnu)
t7881.cc: In function âint main()â:
t7881.cc:10:12: warning: possible problem detected in invocation of delete
operator: [enabled by default]
t7881.cc:10:12: warning: invalid use of template type parameter âTâ [enabled by
default]
t7881.cc:10:12: note: neither the destructor nor the class-specific operator
delete will be called, even if they are declared when the class is defined
t7881.cc:10:12: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.