diff options
Diffstat (limited to 'gcc/testsuite/g++.dg/template/non-dependent2.C')
-rw-r--r-- | gcc/testsuite/g++.dg/template/non-dependent2.C | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/non-dependent2.C b/gcc/testsuite/g++.dg/template/non-dependent2.C new file mode 100644 index 000000000..3b073b47a --- /dev/null +++ b/gcc/testsuite/g++.dg/template/non-dependent2.C @@ -0,0 +1,16 @@ +//PR c++/11070 +// Used to ICE +// Origin: bangerth@dealii.org and rwgk@yahoo.com + +template <bool b> struct X { + template <typename T> + static int* execute(int* x) { return x; } +}; + +template <typename T> void foo() { + static bool const same = true; + X<same>::execute<int> (0); +} + +template void foo<int> (); + |