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 a15c601..d515fdf 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 38e0e61..92a7f5b 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; }
 };