re PR c++/61198 (Crash when selecting specializations through aliases.)
authorKai Tietz <ktietz@redhat.com>
Fri, 19 Dec 2014 16:47:59 +0000 (17:47 +0100)
committerKai Tietz <ktietz@gcc.gnu.org>
Fri, 19 Dec 2014 16:47:59 +0000 (17:47 +0100)
PR c++/61198
* g++.dg/template/using30.C: New file.

From-SVN: r218956

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/using30.C [new file with mode: 0644]

index 5ba1eff2f2bc5ff802095d106d75ee94aa711d7b..9c46504032ae713bffd4f36b0927adbfe8a0fdd4 100644 (file)
@@ -1,3 +1,8 @@
+2014-12-19  Kai Tietz  <ktietz@redhat.com>
+
+       PR c++/61198
+       * g++.dg/template/using30.C: New file.
+
 2014-12-19  Martin Liska  <mliska@suse.cz>
 
        PR ipa/63569
diff --git a/gcc/testsuite/g++.dg/template/using30.C b/gcc/testsuite/g++.dg/template/using30.C
new file mode 100644 (file)
index 0000000..17a3c1e
--- /dev/null
@@ -0,0 +1,24 @@
+// { dg-do compile }
+// PR/61198
+
+template<int herp, typename derp_t>
+struct broken
+{
+       template<typename target_t>
+       using rebind = broken<herp, target_t>;
+};
+
+template<typename derp_t>
+struct broken<2, derp_t>
+{
+       template<typename target_t>
+       using rebind = broken<2, target_t>;
+};
+
+int main(int argc, char **argv)
+{              
+       broken<2, float>::rebind<double> u;
+
+       return 0;
+}
+