aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto34.C18
2 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index eeb62dc..94b23a4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51421
+ * g++.dg/cpp0x/auto34.C: New.
+
2012-08-24 Jakub Jelinek <jakub@redhat.com>
PR c/54363
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto34.C b/gcc/testsuite/g++.dg/cpp0x/auto34.C
new file mode 100644
index 0000000..3682d60
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto34.C
@@ -0,0 +1,18 @@
+// PR c++/51421
+// { dg-do compile { target c++11 } }
+
+int foo1(int);
+
+void bar1()
+{
+ auto i = foo1(i); // { dg-error "before deduction" }
+}
+
+struct A {};
+
+A foo2(A);
+
+void bar2()
+{
+ auto a = foo2(a); // { dg-error "before deduction" }
+}