Commit 18db8f19 by Adam Nemet Committed by Adam Nemet

re PR c++/12883 (destructor of array object not called if no prior instantiation…

re PR c++/12883 (destructor of array object not called if no prior instantiation of the template has happened)

	PR c++/12883
	* g++.dg/init/array14.C: New test.

From-SVN: r82334
parent 81b4398d
2004-05-27 Adam Nemet <anemet@lnxw.com>
PR c++/12883
* g++.dg/init/array14.C: New test.
2004-05-25 Janis Johnson <janis187@us.ibm.com> 2004-05-25 Janis Johnson <janis187@us.ibm.com>
* lib/compat.exp (compat-get-options-main): New. * lib/compat.exp (compat-get-options-main): New.
......
// PR c++/12883
// Bug: Destructor of array object not called if no prior
// instantiation of the template has happened.
// { dg-do run }
int ret = 1;
template <int> struct X
{
X(int) { }
~X() { ret = 0; }
};
int main()
{
{
X<0> array[] = { 0 };
}
return ret;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment