1// Regression test:
2// https://code.google.com/p/address-sanitizer/issues/detail?id=257
3// RUN: %clangxx_lsan %s -o %t && %run %t 2>&1 | FileCheck %s
4
5#include <stdio.h>
6
7struct T {
8 ~T() { printf(format: "~T\n"); }
9};
10
11T *t;
12
13int main(int argc, char **argv) {
14 t = new T[argc - 1];
15 printf(format: "OK\n");
16}
17
18// CHECK: OK
19
20

source code of compiler-rt/test/lsan/TestCases/new_array_with_dtor_0.cpp