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 7 struct T { 8 ~T() { printf("~T\n"); } 9 }; 10 11 T *t; 12 13 int main(int argc, char **argv) { 14 t = new T[argc - 1]; 15 printf("OK\n"); 16 } 17 18 // CHECK: OK 19 20