aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/analyzer/malloc-ipa-8-lto-c.c
blob: d332db13ef0528b3d3131b40f7f2b8b032e0e935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do link } */
/* { dg-require-effective-target lto } */
/* { dg-additional-options "-flto" } */
/* { dg-additional-sources "malloc-ipa-8-lto-a.c malloc-ipa-8-lto-b.c" } */

#include <stdlib.h>
#include "malloc-ipa-8-lto.h"

void test (int i)
{
  boxed_int *obj = make_boxed_int (i);

  free_boxed_int (obj);
  free (obj); /* { dg-warning "double-free" } */
}

int main() { return 0; }