Files
Dmitriy Kuminov fbf7869a1b vendor: Import gcc-9_2_0-release.
Source URL:    git://gcc.gnu.org/git/gcc.git
Source Commit: 3e7b85061947bdc7c7465743ba90734566860821
2019-11-18 21:50:01 +03:00

17 lines
370 B
D

// { dg-shouldfail "static_dtor_exception" }
// { dg-output "object.Exception@.*: static_dtor_exception" }
// https://issues.dlang.org/show_bug.cgi?id=16594
import core.stdc.stdio;
shared static ~this()
{
__gshared int count;
if (count++) fprintf(stderr, "dtor_called_more_than_once");
else throw new Exception("static_dtor_exception");
}
void main()
{
}