[gcc(refs/users/aldyh/heads/ranger-staging)] c++: Add new test [PR92427]

Aldy Hernandez aldyh@gcc.gnu.org
Wed Aug 19 17:14:23 GMT 2020


https://gcc.gnu.org/g:36e8db7c2af254a38fba5a874a3104a2cc1b1aac

commit 36e8db7c2af254a38fba5a874a3104a2cc1b1aac
Author: Marek Polacek <polacek@redhat.com>
Date:   Tue Jul 7 19:28:04 2020 -0400

    c++: Add new test [PR92427]
    
    Fixed in r10-5578.
    
            PR c++/92427
            * g++.dg/ext/flexary37.C: New test.

Diff:
---
 gcc/testsuite/g++.dg/ext/flexary37.C | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gcc/testsuite/g++.dg/ext/flexary37.C b/gcc/testsuite/g++.dg/ext/flexary37.C
new file mode 100644
index 00000000000..ceb5053de2e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/flexary37.C
@@ -0,0 +1,15 @@
+// PR c++/92427
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+class C {
+private:
+    int a; int b;
+public:
+    C(int A, int B) : a(A), b(B) { }
+    ~C() { }
+};
+
+struct y { // { dg-error "unknown array size in delete" }
+    int a; C b[];
+} y = { 1, { { 2, 3 } } }; // { dg-error "unknown array size in delete" }


More information about the Gcc-cvs mailing list