First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 9261
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: pommier@gmm.insa-tlse.fr
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 9261 depends on: Show dependency tree
Show dependency graph
Bug 9261 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2003-01-10 07:26
The following (invalid) code:
#include <iostream>
#include <typeinfo>
struct A {
  virtual void f() {}
};

int main() {
  A* p;
  std::cerr << typeid(*p).name;
}

crashes g++ 3.2, g++ 3.2.1 (and also g++ 3.0) with this message:
t.C: In function `int main()':
t.C:9: Internal compiler error in arg_assoc, at cp/decl2.c:4809

it may be related to the (closed) bugreport #3416 for a crash of g++ 3.0 at the same place.

Release:
3.2 , 3.2.1

Environment:
Debian 3.0 Linux 2.4.18 i686 unknown / g++ (GCC) 3.2.1
OSF1 V4.0 1229 alpha / g++ (GCC) 3.2

------- Comment #1 From Wolfgang Bangerth 2003-01-10 07:43 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed on the 3.2 branch. It's a regression w.r.t. 2.95,
    but is fixed on 3.3 and 3.4, which now give
    
    tmp/g> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc: In function `int main()':
    x.cc:9: error: request for member `std::type_info::name() const' in `
       __cxa_bad_typeid()()', which is of non-class type `const std::type_info&'
    
    The message is not exactly obvious, but once you think
    about it, it's right.
    
    W.

------- Comment #2 From Wolfgang Bangerth 2003-01-10 09:59 -------
From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org, <gcc-bugs@gcc.gnu.org>, <pommier@gmm.insa-tlse.fr>
Cc:  
Subject: Re: c++/9261: [3.2 regression] Internal compiler error in arg_assoc,
 at cp/decl2.c:4793
Date: Fri, 10 Jan 2003 09:59:15 -0600 (CST)

 In case someone wants to move a possible fixing patch from the mainline to 
 the 3.2 branch: the problem was fixed on mainline sometime between
 2002-08-15 and 2002-09-01. However, it should be noted that the ICE moved 
 before it was fixed, which might indicate that it would not be a single 
 small patch to fix it. Here's the places where the ICE occurs:
 
 2001-01-01 through 2002-08-01: arg_assoc, at cp/decl2.c:4903
 2002-08-15                   : resolve_overloaded_unification, at cp/pt.c:8249
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth/
 
 

------- Comment #3 From Joe Buck 2003-04-25 20:17 -------
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