Tested x86_64-pc-linux-gnu, applying to trunk.
-- >8 --
Another test for the recently-fixed PR124324.
PR c++/124324
gcc/testsuite/ChangeLog:
* g++.dg/reflect/substitute6.C: New test.
---
gcc/testsuite/g++.dg/reflect/substitute6.C | 13 +++++++++++++
1 file changed, 13 insertions(+)
create mode 100644 gcc/testsuite/g++.dg/reflect/substitute6.C
diff --git a/gcc/testsuite/g++.dg/reflect/substitute6.C
b/gcc/testsuite/g++.dg/reflect/substitute6.C
new file mode 100644
index 00000000000..8d9665ba933
--- /dev/null
+++ b/gcc/testsuite/g++.dg/reflect/substitute6.C
@@ -0,0 +1,13 @@
+// PR c++/124324
+// { dg-do compile { target c++26 } }
+// { dg-additional-options "-freflection" }
+
+#include <meta>
+
+template<typename>
+void function ();
+
+constexpr auto substituted = substitute (^^function, {^^int});
+static_assert (is_function (substituted));
+constexpr auto t = type_of (substituted);
+[: t :] bar;
base-commit: 40ee8d4e9f95a2217c1e0d72477522f98807f118
--
2.53.0