Bug 35317 - [4.2 regression] ICE with operator delete[] and ellipsis
Summary: [4.2 regression] ICE with operator delete[] and ellipsis
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.4.0
: P2 normal
Target Milestone: 4.3.2
Assignee: Simon Martin
URL:
Keywords: ice-on-valid-code, monitored
Depends on:
Blocks:
 
Reported: 2008-02-23 18:00 UTC by Volker Reichelt
Modified: 2009-03-31 15:14 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.3.2 4.4.0
Known to fail: 4.2.5
Last reconfirmed: 2008-06-15 12:18:53


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2008-02-23 18:00:12 UTC
The following valid code snippet triggers an ICE since GCC 3.1:

============================================
struct A
{
  void operator delete[] (void*, ...);
};
============================================

bug.cc:2: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
Comment 1 Simon Martin 2008-03-08 12:45:20 UTC
Patch submitted here:
  http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00527.html
Comment 2 Simon Martin 2008-06-14 00:20:11 UTC
Subject: Bug 35317

Author: simartin
Date: Sat Jun 14 00:19:25 2008
New Revision: 136774

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136774
Log:
gcc/cp/

2008-06-14  Simon Martin  <simartin@users.sourceforge.net>

	    PR c++/35317
	    * class.c (type_requires_array_cookie): Do not consider delete[]
	    operators with an ellipsis as second argument.

gcc/testsuite/

2008-06-14  Simon Martin  <simartin@users.sourceforge.net>

	    PR c++/35317
	    * g++.dg/other/dtor2.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/dtor2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/class.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Simon Martin 2008-06-15 11:58:18 UTC
Subject: Bug 35317

Author: simartin
Date: Sun Jun 15 11:57:33 2008
New Revision: 136807

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136807
Log:
gcc/cp/

2008-06-15  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/35317
	* class.c (type_requires_array_cookie): Do not consider delete[]
	operators with an ellipsis as second argument.

gcc/testsuite/

2008-06-15  Simon Martin  <simartin@users.sourceforge.net>

	PR c++/35317
	* g++.dg/other/dtor2.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/other/dtor2.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/class.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog

Comment 4 Simon Martin 2008-06-15 12:18:53 UTC
Fixed in 4.3 and 4.4.
Comment 5 Joseph S. Myers 2008-07-04 22:34:05 UTC
Closing 4.1 branch.
Comment 6 Joseph S. Myers 2009-03-31 15:14:53 UTC
Closing 4.2 branch, fixed in 4.3.2 and 4.4.