aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/analyzer/pr97608.c
blob: ddfa0091d86c4c5a8e3d4990c5af642d1abeb0d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-skip-if "requires hosted libstdc++ for stdlib malloc" { ! hostedlib } } */

#include <stdlib.h>

void *f (void)
{
  void *p = malloc (8);
  if (p == NULL)
    abort ();
  return (void *) ((char *) p + 0);
}

void *g (void)
{
  void *p = malloc (8);
  if (p == NULL)
    abort ();
  return (void *) ((char *) p + 1);
}