]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add fixed test [PR102455]
authorMarek Polacek <polacek@redhat.com>
Mon, 17 Feb 2025 17:36:05 +0000 (12:36 -0500)
committerMarek Polacek <polacek@redhat.com>
Mon, 17 Feb 2025 17:36:18 +0000 (12:36 -0500)
Fixed by r13-4564 but the tests are very different.

PR c++/102455

gcc/testsuite/ChangeLog:

* g++.dg/ext/vector43.C: New test.

gcc/testsuite/g++.dg/ext/vector43.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/ext/vector43.C b/gcc/testsuite/g++.dg/ext/vector43.C
new file mode 100644 (file)
index 0000000..6efbe0f
--- /dev/null
@@ -0,0 +1,7 @@
+// PR c++/102455
+// { dg-do compile { target c++14 } }
+
+typedef int v4si;
+typedef float v4sf __attribute__ ((vector_size(4)));
+constexpr v4sf foo (v4si a) { return (v4sf)a;}
+template <class> constexpr v4sf b = foo (v4si {});