aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31434.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31434.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31434.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31434.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31434.C
new file mode 100644
index 0000000..e70bdd1
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31434.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+template<typename... T> int foo(const T&) // { dg-error "not expanded with|T" }
+{
+ union { T t; }; // { dg-error "not expanded with|T" }
+ return t;
+}
+
+void bar()
+{
+ foo(0); // { dg-error "no matching" }
+ // { dg-message "(candidate|cannot convert)" "candidate note" { target *-*-* } 10 }
+}