aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-07-07 19:28:04 -0400
committerMarek Polacek <polacek@redhat.com>2020-07-07 19:28:53 -0400
commit36e8db7c2af254a38fba5a874a3104a2cc1b1aac (patch)
tree1751befc0dec5beaee1666281dc2574d0644d0ac /gcc
parent161aa50ee2d1142802d7200733fee1cf532d6696 (diff)
downloadgcc-36e8db7c2af254a38fba5a874a3104a2cc1b1aac.zip
gcc-36e8db7c2af254a38fba5a874a3104a2cc1b1aac.tar.gz
gcc-36e8db7c2af254a38fba5a874a3104a2cc1b1aac.tar.bz2
c++: Add new test [PR92427]
Fixed in r10-5578. PR c++/92427 * g++.dg/ext/flexary37.C: New test.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/g++.dg/ext/flexary37.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/ext/flexary37.C b/gcc/testsuite/g++.dg/ext/flexary37.C
new file mode 100644
index 0000000..ceb5053
--- /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" }