public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36406]  New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator
@ 2008-06-01 10:32 reichelt at gcc dot gnu dot org
  2008-06-01 10:32 ` [Bug c++/36406] " reichelt at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-01 10:32 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since GCC 3.0:

====================================================
struct A
{
  A();
  void* operator new(__SIZE_TYPE__, int = 0);
  template<int> void operator delete(void*, int);
};

A* p = new A;
====================================================

gimplification failed:
<<< Unknown tree: template_decl >>>
 <template_decl 0x40230138 operator delete
    type <function_type 0x401aebc8
        type <void_type 0x401a64e0 void type_6 VOID
            align 8 symtab 0 alias set -1 canonical type 0x401a64e0
            pointer_to_this <pointer_type 0x401a6548>>
        type_6 QI
        size <integer_cst 0x4018f6ac constant 8>
        unit size <integer_cst 0x4018f6c8 constant 1>
        align 8 symtab 0 alias set -1 canonical type 0x401aebc8
        arg-types <tree_list 0x401aaa2c value <pointer_type 0x401a6548>
            chain <tree_list 0x401aaa48 value <integer_type 0x4019d2d8 int>
                chain <tree_list 0x401aa118 value <void_type 0x401a64e0
void>>>>
        pointer_to_this <pointer_type 0x402304e0>>
    used ignored decl_1 VOID file bug.cc line 5 col 48
    align 1 context <record_type 0x40227c98 A>
    arguments <tree_list 0x4022d658 purpose <integer_cst 0x4018f6c8 1>
        value <tree_vec 0x4022d63c type <template_decl 0x40230138 operator
delete>

            elt 0 <tree_list 0x4022d620>>>
    result <function_decl 0x40224af0 operator delete type <function_type
0x401aebc8>
        public external no-static-chain decl_3 QI file bug.cc line 5 col 48
align 8 context <record_type 0x40227c98 A>
        arguments <parm_decl 0x401968c0 D.1661 type <pointer_type 0x401a6548>
            unsigned SI file bug.cc line 5 col 48
            size <integer_cst 0x4018f834 constant 32>
            unit size <integer_cst 0x4018f620 constant 4>
            align 32 chain <parm_decl 0x40196910 D.1662>>
        template-info 0x4022d6c8>
   >
bug.cc: In function 'void __static_initialization_and_destruction_0(int, int)':
bug.cc:8: internal compiler error: gimplification failed
Please submit a full bug report, [etc.]

GCC 2.95.3 used to generate a valid error message:

bug.cc: In function `void __static_initialization_and_destruction_0(int, int)':
bug.cc:8: no suitable operator delete for `A'


-- 
           Summary: [4.1/4.2/4.3/4.4 regression] ICE with template delete
                    operator
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/36406] [4.1/4.2/4.3/4.4 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
@ 2008-06-01 10:32 ` reichelt at gcc dot gnu dot org
  2008-06-06 20:30 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-01 10:32 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.4


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


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

* [Bug c++/36406] [4.1/4.2/4.3/4.4 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
  2008-06-01 10:32 ` [Bug c++/36406] " reichelt at gcc dot gnu dot org
@ 2008-06-06 20:30 ` rguenth at gcc dot gnu dot org
  2008-07-04 16:42 ` [Bug c++/36406] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-06 20:30 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/36406] [4.2/4.3/4.4 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
  2008-06-01 10:32 ` [Bug c++/36406] " reichelt at gcc dot gnu dot org
  2008-06-06 20:30 ` rguenth at gcc dot gnu dot org
@ 2008-07-04 16:42 ` jsm28 at gcc dot gnu dot org
  2008-07-30 10:21 ` jakub at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 16:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jsm28 at gcc dot gnu dot org  2008-07-04 16:41 -------
Closing 4.1 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1/4.2/4.3/4.4 regression]|[4.2/4.3/4.4 regression] ICE
                   |ICE with template delete    |with template delete
                   |operator                    |operator
   Target Milestone|4.1.4                       |4.2.5


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


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

* [Bug c++/36406] [4.2/4.3/4.4 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-07-04 16:42 ` [Bug c++/36406] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2008-07-30 10:21 ` jakub at gcc dot gnu dot org
  2008-09-20 15:15 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-30 10:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2008-07-30 10:20 -------
And
struct A
{
  A ();
  void *operator new (__SIZE_TYPE__, int = 0);
  template <typename T> void operator delete (void *, T);
};

template <> void A::operator delete<int> (void *, int);

A *p = new A;

ICEs in coerce_delete_type, type is METHOD_TYPE, but it asserts FUNCTION_TYPE.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dodji at gcc dot gnu dot org


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


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

* [Bug c++/36406] [4.2/4.3/4.4 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-07-30 10:21 ` jakub at gcc dot gnu dot org
@ 2008-09-20 15:15 ` rguenth at gcc dot gnu dot org
  2009-02-05 15:36 ` paolo dot carlini at oracle dot com
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-20 15:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2008-09-20 15:14 -------
Confirmed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
      Known to fail|                            |3.3.6 4.3.2
      Known to work|                            |2.95.4
   Last reconfirmed|0000-00-00 00:00:00         |2008-09-20 15:14:23
               date|                            |


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


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

* [Bug c++/36406] [4.2/4.3/4.4 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-09-20 15:15 ` rguenth at gcc dot gnu dot org
@ 2009-02-05 15:36 ` paolo dot carlini at oracle dot com
  2009-03-31 20:53 ` [Bug c++/36406] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-02-05 15:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from paolo dot carlini at oracle dot com  2009-02-05 15:36 -------
Note the first snippet only triggers a warning with ICC / Comeau in strict
mode, the second one, compiles just fine...


-- 


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


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

* [Bug c++/36406] [4.3/4.4/4.5 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-02-05 15:36 ` paolo dot carlini at oracle dot com
@ 2009-03-31 20:53 ` jsm28 at gcc dot gnu dot org
  2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jsm28 at gcc dot gnu dot org  2009-03-31 20:53 -------
Closing 4.2 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3/4.4/4.5 regression]|[4.3/4.4/4.5 regression] ICE
                   |ICE with template delete    |with template delete
                   |operator                    |operator
   Target Milestone|4.2.5                       |4.3.4


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


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

* [Bug c++/36406] [4.3/4.4/4.5 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-03-31 20:53 ` [Bug c++/36406] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
@ 2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
  2009-11-10  3:47 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.4                       |4.3.5


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


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

* [Bug c++/36406] [4.3/4.4/4.5 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
@ 2009-11-10  3:47 ` jason at gcc dot gnu dot org
  2009-11-10 18:19 ` jason at gcc dot gnu dot org
  2009-11-12 22:05 ` jason at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-10  3:47 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-09-20 20:23:25         |2009-11-10 03:47:14
               date|                            |


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


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

* [Bug c++/36406] [4.3/4.4/4.5 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-11-10  3:47 ` jason at gcc dot gnu dot org
@ 2009-11-10 18:19 ` jason at gcc dot gnu dot org
  2009-11-12 22:05 ` jason at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-10 18:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jason at gcc dot gnu dot org  2009-11-10 18:19 -------
Subject: Bug 36406

Author: jason
Date: Tue Nov 10 18:18:51 2009
New Revision: 154072

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154072
Log:
        PR c++/34158
        PR c++/36406
        * call.c (non_placement_deallocation_fn_p): Split out...
        (build_op_delete_call): ...from here.  Use instantiate_type
        for placement delete.  Simplify logic.
        * pt.c (primary_template_instantiation_p): Non-static.
        * cp-tree.h: Declare it.

Added:
    trunk/gcc/testsuite/g++.dg/init/placement4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36406] [4.3/4.4/4.5 regression] ICE with template delete operator
  2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2009-11-10 18:19 ` jason at gcc dot gnu dot org
@ 2009-11-12 22:05 ` jason at gcc dot gnu dot org
  10 siblings, 0 replies; 13+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 22:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jason at gcc dot gnu dot org  2009-11-12 22:05 -------
Fixed for 4.5, not backporting fix for invalid-code bug.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.3.5                       |4.5.0


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


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

* [Bug c++/36406] [4.3/4.4/4.5 regression] ICE with template delete operator
       [not found] <bug-36406-4@http.gcc.gnu.org/bugzilla/>
@ 2022-12-14 19:47 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-14 19:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36406

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2) 
> ICEs in coerce_delete_type, type is METHOD_TYPE, but it asserts
> FUNCTION_TYPE.

This still ICEs today and is now reported as PR 108112.

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

end of thread, other threads:[~2022-12-14 19:47 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-01 10:32 [Bug c++/36406] New: [4.1/4.2/4.3/4.4 regression] ICE with template delete operator reichelt at gcc dot gnu dot org
2008-06-01 10:32 ` [Bug c++/36406] " reichelt at gcc dot gnu dot org
2008-06-06 20:30 ` rguenth at gcc dot gnu dot org
2008-07-04 16:42 ` [Bug c++/36406] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-07-30 10:21 ` jakub at gcc dot gnu dot org
2008-09-20 15:15 ` rguenth at gcc dot gnu dot org
2009-02-05 15:36 ` paolo dot carlini at oracle dot com
2009-03-31 20:53 ` [Bug c++/36406] [4.3/4.4/4.5 " jsm28 at gcc dot gnu dot org
2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
2009-11-10  3:47 ` jason at gcc dot gnu dot org
2009-11-10 18:19 ` jason at gcc dot gnu dot org
2009-11-12 22:05 ` jason at gcc dot gnu dot org
     [not found] <bug-36406-4@http.gcc.gnu.org/bugzilla/>
2022-12-14 19:47 ` pinskia 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).