[TTC-9] Make LSan compliant with recovery mode when running on top of ASan
[platform/upstream/gcc.git] / gcc / testsuite / gcc.dg / asan / leak_recover-1.c
1 /* { dg-do run } */
2 /* { dg-set-target-env-var ASAN_OPTIONS "halt_on_error=0" } */
3
4 #include <stdlib.h>
5
6 int f () {
7   volatile int* a = malloc(20);
8   a[0] = 1;
9   return a[0];
10 }
11
12 int main() {
13   f();
14 }
15
16 /* { dg-output {Direct leak of 20 byte} }  */