aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/predict-1.C
blob: 8e2032f33a4db1a4820887ca0ca89a3a3a87b351 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-profile_estimate" } */

#include <new>

int *r;

void test()
{
  r = new(std::nothrow) int;
  if (r)
    __builtin_memset (r, 0, sizeof(int));
}

/* { dg-final { scan-tree-dump "malloc returned non-NULL heuristics of edge\[^:\]*: 99.96%" "profile_estimate"} } */