summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C
new file mode 100644
index 0000000000..ec98ece588
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C
@@ -0,0 +1,14 @@
+// { dg-options "-pedantic" }
+// { dg-do compile { target { i?86-*-* && ilp32 } } }
+// { dg-require-effective-target c++11 }
+
+struct A {
+ [[gnu::fastcall]]
+ void f();
+};
+
+int main()
+{
+ typedef void (A::*FP)();
+ FP fp[] = {&A::f}; // { dg-error "cannot convert" }
+}