| Summary: | [3.2 regression] Internal compiler error in arg_assoc, at cp/decl2.c:4793 | ||
|---|---|---|---|
| Product: | gcc | Reporter: | pommier |
| Component: | c++ | Assignee: | Not yet assigned to anyone <unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | bangerth, gcc-bugs, jbuck |
| Priority: | P3 | Keywords: | ice-on-invalid-code |
| Version: | 3.2.1 | ||
| Target Milestone: | --- | ||
| Host: | Target: | ||
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | ||
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.
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/ State-Changed-From-To: analyzed->closed State-Changed-Why: Fixed for 3.3. |
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