This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18517] Throwing not-yet-defined exceptions from templated function kills GCC
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2005 20:32:26 -0000
- Subject: [Bug c++/18517] Throwing not-yet-defined exceptions from templated function kills GCC
- References: <20041116073816.18517.elegant_dice@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-01-18 20:32 -------
Here's a reduced testcase that uses all RAM:
=============================
template<int> void foo()
{
throw A;
}
struct A
{
virtual ~A();
};
void bar()
{
foo<0>();
}
=============================
Commenting out the virtual destructor gives the ICE in c_expand_expr.
I don't think we can rate this as a regression:
All released version from 2.95.3 till 3.3.5 ICE on that code.
The couple of snapshots from Phil's regression hunter that do
not ICE issue a very strange error message:
input.cc: In function `void foo() [with int = 0]':
input.cc:12: instantiated from here
input.cc:3: non-lvalue in unary `&'
To me that looks like garbage found in memery. A more elaborate example
can probably turn this into an ICE.
So closing as fixed in gcc 3.4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Status|NEW |RESOLVED
Resolution| |FIXED
Summary|[3.3 Regression] throwing |Throwing not-yet-defined
|not-yet-defined exceptions |exceptions from templated
|from templated function |function kills GCC
|kills GCC |
Target Milestone|3.3.6 |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18517