re PR testsuite/63299 (ASan reported alloc-dealloc-mismatch in g++.old-deja/g++.jason...
authorMaxim Ostapenko <m.ostapenko@samsung.com>
Tue, 20 Sep 2016 15:19:14 +0000 (15:19 +0000)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 20 Sep 2016 15:19:14 +0000 (17:19 +0200)
PR testsuite/63299
* g++.old-deja/g++.jason/init3.C (My_string::~My_string): Use delete[]
instead of delete.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r240268

gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.jason/init3.C

index a15c601e33f0910137ea1b43ca201ea13c2737c6..d515fdf5bcf8b77327fd790765963c4d028516ff 100644 (file)
@@ -1,3 +1,10 @@
+2016-09-20  Maxim Ostapenko  <m.ostapenko@samsung.com>
+           Jakub Jelinek  <jakub@redhat.com>
+
+       PR testsuite/63299
+       * g++.old-deja/g++.jason/init3.C (My_string::~My_string): Use delete[]
+       instead of delete.
+
 2016-09-20  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/77626
index 38e0e61d325a48a67241fae5547637c6b3555022..92a7f5b89e3a648674399f116823cd6434a986ed 100644 (file)
@@ -10,7 +10,7 @@ class My_string {
 public:
    My_string(const char* string);
    My_string(const My_string &);
-   ~My_string() { delete str; }
+   ~My_string() { delete [] str; }
    char* char_p() { return str; }
 };