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: unassig...@gcc.gnu.org
        ReportedBy: pins...@gcc.gnu.org
                CC: fl...@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.

Reply via email to