aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for26.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for27.C15
3 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dd34bc6..68d415e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+ PR c++/58503
+ * g++.dg/cpp0x/range-for26.C: New.
+ * g++.dg/cpp0x/range-for27.C: Likewise.
+
+2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
PR c++/58448
* g++.dg/template/crash117.C: New.
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for26.C b/gcc/testsuite/g++.dg/cpp0x/range-for26.C
new file mode 100644
index 0000000..71359cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for26.C
@@ -0,0 +1,7 @@
+// PR c++/58503
+// { dg-require-effective-target c++11 }
+
+template<int> void foo()
+{
+ for (auto i : 0) {} // { dg-error "there are no arguments" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for27.C b/gcc/testsuite/g++.dg/cpp0x/range-for27.C
new file mode 100644
index 0000000..a9cfb8e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for27.C
@@ -0,0 +1,15 @@
+// PR c++/58503
+// { dg-require-effective-target c++11 }
+// { dg-options "-fpermissive -w" }
+
+struct c { };
+
+template<int> void foo()
+{
+ for (auto i : c()) { }
+}
+
+c* begin(const c&);
+c* end(const c&);
+
+template void foo<1>();