1 /* { dg-do run } */
2 /* { dg-options "-O -fdump-tree-fre1-details" } */
3 
4 int j;
main()5 int main ()
6 {
7   int i = 1;
8   int **p;
9   j = 0;
10   p = __builtin_malloc (sizeof (int *));
11   *p = &i;
12   p = __builtin_realloc (p, 2 * sizeof (int *));
13   **p = 0;
14   if (i != 0)
15     __builtin_abort ();
16   return j;
17 }
18 
19 /* { dg-final { scan-tree-dump "Replaced j with 0" "fre1" } } */
20