]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: add fixed test [PR101740]
authorMarek Polacek <polacek@redhat.com>
Wed, 12 Feb 2025 20:48:22 +0000 (15:48 -0500)
committerMarek Polacek <polacek@redhat.com>
Wed, 12 Feb 2025 20:48:43 +0000 (15:48 -0500)
Fixed by r12-3643.

PR c++/101740

gcc/testsuite/ChangeLog:

* g++.dg/template/dtor12.C: New test.

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

diff --git a/gcc/testsuite/g++.dg/template/dtor12.C b/gcc/testsuite/g++.dg/template/dtor12.C
new file mode 100644 (file)
index 0000000..2c75ee0
--- /dev/null
@@ -0,0 +1,19 @@
+// PR c++/101740
+
+template<template<class> class T, class U>
+struct Test{
+    void fun(){
+        T<U> d;
+        d.~GG<int>();  // #1
+    }
+};
+
+template<class >
+struct GG {};
+
+int
+main ()
+{
+  Test<GG, int> b;
+  b.fun();
+}