diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/ctor2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/ctor2.C | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/ctor2.C b/gcc/testsuite/g++.dg/template/ctor2.C new file mode 100644 index 000000000..1c8d8a65d --- /dev/null +++ b/gcc/testsuite/g++.dg/template/ctor2.C @@ -0,0 +1,18 @@ +// { dg-do run } + +int i; + +template <class T> +struct S +{ + S () { i = 1; } +}; + +static S<int> s[1]; + +int main () +{ + if (!i) + return 1; +} + |