re PR c++/49377 (Template specialization attributes cause type mismatches when used)
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 5 Jun 2016 15:08:22 +0000 (15:08 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 5 Jun 2016 15:08:22 +0000 (15:08 +0000)
2016-06-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/49377
* g++.dg/template/pr49377.C: New.

From-SVN: r237098

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/pr49377.C [new file with mode: 0644]

index c272ade580901b8e6bfa0441280758340bd2dfaf..f327b8243b5156d19f1f367bf5398c8135af4e6e 100644 (file)
@@ -1,3 +1,8 @@
+2016-06-05  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/49377
+       * g++.dg/template/pr49377.C: New.
+
 2016-06-04  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/71405
diff --git a/gcc/testsuite/g++.dg/template/pr49377.C b/gcc/testsuite/g++.dg/template/pr49377.C
new file mode 100644 (file)
index 0000000..cb4287a
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/49377
+
+template <typename T, int N> class v;
+
+template <typename T> class v<T,2> {
+    v() { };
+} __attribute__((__may_alias__));
+
+typedef v<float,2> float2;
+
+class a {
+    void f(float2 &point);
+    float2 d;
+};
+
+void a::f(float2 &point) { }