Debian Codegraph @

gcc/testsuite/g++.dg/asan/pr88901.C

raw
1 // PR sanitizer/88901
2 // { dg-do compile }
3 // { dg-options "-fsanitize=address -fsanitize=pointer-compare" }
4
5 template <typename T>
6 struct A {
7 void foo() {
8 auto d = [](char *x, char *y) {
9 for (char *p = x; p + sizeof(T) <= y; p += sizeof(T))
10 reinterpret_cast<T *>(p)->~T();
11 };
12 }
13 };