aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/cpp0x')
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C
new file mode 100644
index 0000000..c4e6dea
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C
@@ -0,0 +1,12 @@
+// PR c++/58584
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i alignas(this); // { dg-error "17:invalid use of 'this'" }
+};
+
+template<int> struct B
+{
+ int j alignas(this); // { dg-error "17:invalid use of 'this'" }
+};