summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/ext/attrib31.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/ext/attrib31.C')
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib31.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/attrib31.C b/gcc/testsuite/g++.dg/ext/attrib31.C
new file mode 100644
index 000000000..c614ed4f4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib31.C
@@ -0,0 +1,15 @@
+// PR c++/35097
+
+template<int> struct A;
+
+template<> struct A<0>
+{
+ typedef int X __attribute((aligned(4)));
+};
+
+template<typename T> void foo(const A<0>::X&, T);
+
+void bar()
+{
+ foo(A<0>::X(), 0);
+}