public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/48491] New: ICE in "delete" with template convertion operator
@ 2011-04-07 12:41 flast at flast dot jp
  2011-12-15 23:26 ` [Bug c++/48491] " pinskia at gcc dot gnu.org
  2012-02-06 20:04 ` jason at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: flast at flast dot jp @ 2011-04-07 12:41 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48491

           Summary: ICE in "delete" with template convertion operator
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: flast@flast.jp


GCC becomes ICE with -flto option.

---- testcase.C ----
struct S
{
    template < typename T >
    operator T *() { return 0; }
};

int main()
{
    S s;
    delete s;
}
---

GCC outputs following error.

testcase.C: In function 'int main()':
testcase.C:10:12: warning: possible problem detected in invocation of delete
operator: [enabled by default]
testcase.C:10:12: warning: invalid use of template type parameter 'T' [enabled
by default]
testcase.C: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
testcase.C: At top level:
testcase.C:11:1: internal compiler error: tree code 'template_type_parm' is not
supported in gimple streams
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


All of following versions become ICE.
4.5.2
4.5.3 20110217
4.6.0
4.6.1 20110310
4.7.0 20110405


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/48491] ICE in "delete" with template convertion operator
  2011-04-07 12:41 [Bug c++/48491] New: ICE in "delete" with template convertion operator flast at flast dot jp
@ 2011-12-15 23:26 ` pinskia at gcc dot gnu.org
  2012-02-06 20:04 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-15 23:26 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48491

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |lto
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-15
          Component|lto                         |c++
            Version|lto                         |4.7.0
     Ever Confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-15 23:23:11 UTC ---
Confirmed.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/48491] ICE in "delete" with template convertion operator
  2011-04-07 12:41 [Bug c++/48491] New: ICE in "delete" with template convertion operator flast at flast dot jp
  2011-12-15 23:26 ` [Bug c++/48491] " pinskia at gcc dot gnu.org
@ 2012-02-06 20:04 ` jason at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: jason at gcc dot gnu.org @ 2012-02-06 20:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48491

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2012-02-06 20:03:11 UTC ---
Fixed by patch for PR52088.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-06 20:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-07 12:41 [Bug c++/48491] New: ICE in "delete" with template convertion operator flast at flast dot jp
2011-12-15 23:26 ` [Bug c++/48491] " pinskia at gcc dot gnu.org
2012-02-06 20:04 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).