re PR c++/50478 ([C++0x] Internal compiler error when using initializer lists)
authorPaolo Carlini <paolo.carlini@oracle.com>
Wed, 10 Oct 2012 09:12:19 +0000 (09:12 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Wed, 10 Oct 2012 09:12:19 +0000 (09:12 +0000)
2012-10-10  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/50478
* g++.dg/cpp0x/initlist67.C: New.

From-SVN: r192295

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

index a5a27a87fd31c492ef546efde7e478fc8dd5c681..f72f597439140a6d20adb0362ad648eb438721a1 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-10  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/50478
+       * g++.dg/cpp0x/initlist67.C: New.
+
 2012-10-10  Dehao Chen  <dehao@google.com>
 
        * g++.dg/debug/dwarf2/deallocator.C: Cover more deallocator cases.
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist67.C b/gcc/testsuite/g++.dg/cpp0x/initlist67.C
new file mode 100644 (file)
index 0000000..491d4cf
--- /dev/null
@@ -0,0 +1,27 @@
+// PR c++/50478
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+namespace std
+{
+  template<typename _Key>
+    struct set
+    {
+      void insert(const _Key&);
+      void insert(initializer_list<_Key>);
+    };
+
+  struct string
+  {
+    string(const string&, __SIZE_TYPE__, __SIZE_TYPE__ = -1);
+    string(const char*);
+    string(initializer_list<char>);
+  };
+}
+
+int main()
+{
+  std::set<std::string> s;
+  s.insert( { "abc", "def", "hij"} );
+}