Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 8724
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Mark Mitchell <mmitchel@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: eker@csl.sri.com
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 8724 depends on: Show dependency tree
Show dependency graph
Bug 8724 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2002-11-26 12:06
G++ 3.2 accepts explicit destructor call for incomplete class and
silently generates bad code. G++ 2.95.3 does not have this problem.
The output is from a linux box. I have also seen this happen with
G++ 3.1 & 3.2 on a solaris box.

> g++-3.2 -v -Wall -S gccBug.cc
Reading specs from /csl/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
Configured with: ./configure --prefix=/csl --program-suffix=-3.2
Thread model: posix
gcc version 3.2
 /csl/lib/gcc-lib/i686-pc-linux-gnu/3.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ gccBug.cc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase gccBug.cc -Wall -version -o gccBug.s
GNU CPP version 3.2 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2 (i686-pc-linux-gnu)
        compiled by GNU C version 3.2.
#include "..." search starts here:
#include <...> search starts here:
 /csl/include/c++/3.2
 /csl/include/c++/3.2/i686-pc-linux-gnu
 /csl/include/c++/3.2/backward
 /usr/local/include
 /csl/include
 /csl/lib/gcc-lib/i686-pc-linux-gnu/3.2/include
 /csl/i686-pc-linux-gnu/include
 /usr/include
End of search list.

Release:
3.2

Environment:
Red Hat Linux 7.3 2.96-110 on a P4

How-To-Repeat:
class Foo;

void
bar(void* p)
{
  static_cast<Foo*>(p)->~Foo();
}

------- Comment #1 From eker@csl.sri.com 2002-11-26 12:06 -------
Fix:
http://gcc.gnu.org/ml/gcc-patches/2003-02/msg01840.html

------- Comment #2 From Wolfgang Bangerth 2002-11-26 12:16 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed. It's a regression.

------- Comment #3 From Mark Mitchell 2002-12-17 14:12 -------
Responsible-Changed-From-To: unassigned->mmitchel
Responsible-Changed-Why: Working on a fix.

------- Comment #4 From Volker Reichelt 2003-01-13 01:33 -------
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, eker@csl.sri.com, gcc-bugs@gcc.gnu.org,
        mmitchel@gcc.gnu.org
Cc:  
Subject: Re: c++/8724: [3.2/3.3 regression] explicit destructor call for incomplete class allowed
Date: Mon, 13 Jan 2003 01:33:03 +0100

 Just for the record: The bug is fixed with the new parser.
 It's still a 3.2/3.3 regression, though.
 
 Regards,
 Volker
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8724
 
 


------- Comment #5 From Volker Reichelt 2003-03-10 13:01 -------
From: Volker Reichelt <reichelt@igpm.rwth-aachen.de>
To: gcc-gnats@gcc.gnu.org, eker@csl.sri.com, gcc-bugs@gcc.gnu.org,
 mmitchel@gcc.gnu.org
Cc:  
Subject: Re: c++/8724: [3.2 regression] explicit destructor call for incomplete
 class allowed
Date: Mon, 10 Mar 2003 13:01:06 +0100 (CET)

 Just for the record:
 
 The problem seems to be fixed on the 3.3 branch (as well as on
 mainline). It just remains open on the 3.2 branch.
 
 Regards,
 Volker
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8724
 
 

------- Comment #6 From Joe Buck 2003-04-25 21:06 -------
State-Changed-From-To: analyzed->closed
State-Changed-Why: Fixed for 3.3.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug