First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 9622
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: jamagallon@able.es
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 9622 depends on: Show dependency tree
Show dependency graph
Bug 9622 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2003-02-08 00:06
simple example:
#include <iostream>

using namespace std;

class A {
public:
        A() { cout << __PRETTY_FUNCTION__ << endl; };
        ~A() { cout << __PRETTY_FUNCTION__ << endl; };
};

template<class T>
class B {
public:
        B() { cout << __PRETTY_FUNCTION__ << endl; };
        ~B() { cout << __PRETTY_FUNCTION__ << endl; };
};

int main()
{
        A a;
        B<int> b;

        return 0;
}

Result:
werewolf:~/bug> g++ -O2 bug.cc -o bug
werewolf:~/bug> bug
A::A()
B<T>::B() [with T = int]
void B<T>::B() [with T = int]
A::~A()

Release:
3.2.1

Environment:
werewolf:~/bug> gcc --version
gcc-3.2.1 (GCC) 3.2.1 (Mandrake Linux 9.1 3.2.1-6mdk)

------- Comment #1 From Wolfgang Bangerth 2003-02-08 00:28 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Fixed in 3.3 and 3.4, not fixed in 3.2.2. Worked in 2.95:
    
    tmp/g> /home/bangerth/bin/gcc-3.3-pre/bin/c++ z.cc
    tmp/g> ./a.out
    A::A()
    B<T>::B() [with T = int]
    B<T>::~B() [with T = int]
    A::~A()
    
    tmp/g> /home/bangerth/bin/gcc-3.2.2-pre/bin/c++ z.cc
    tmp/g> ./a.out
    A::A()
    B<T>::B() [with T = int]
    void B<T>::B() [with T = int]
    A::~A()
    
    tmp/g> c++ z.cc
    tmp/g> ./a.out
    A::A()
    B<int>::B()
    B<int>::~B()
    A::~A()
    
    I think I recall that there was once a report in the bug
    database about this case. It may contain a clue as to
    what patch fixed this. If you want, it would be great
    if you could try to find this patch, and it might go
    into a possible gcc3.2.3, if such a release ever happens.
    
    Thanks 
      Wolfgang

------- Comment #2 From Danny Smith 2003-02-08 07:29 -------
From: Danny Smith <dannysmith@clear.net.nz>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org,
 jamagallon@able.es, gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: c++/9622: [3.2 regression] __PRETTY_FUNCTION__ incorrect in
 template dtors
Date: Sat, 08 Feb 2003 07:29:02 +0000

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=g
 cc&pr=9622
 
 
 This is duplicate of 7768
 The audit trail for that PR provides links to the diffs for 3.3. fix.
 It's a one-liner, applies cleanly to 3.2.2 release and allows the
 testsuite/g++.dg/template/pretty1.C  (added with patch for 7768) to pass
 on 3.2 branch
 
 Danny
 

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

First Last Prev Next    No search results available      Search page      Enter new bug