示例#1
0
int
main (void)
{
  if (have_mpx ())
    {
      int sx[OUR_SIZE];
      int sa[OUR_SIZE];
      int sb[OUR_SIZE];
      int sc[OUR_SIZE];
      int sd[OUR_SIZE];
      int *x, *a, *b, *c, *d;

      x = calloc (OUR_SIZE, sizeof (int));
      a = calloc (OUR_SIZE, sizeof (int));
      b = calloc (OUR_SIZE, sizeof (int));
      c = calloc (OUR_SIZE, sizeof (int));
      d = calloc (OUR_SIZE, sizeof (int));

      upper (x, a, b, c, d, OUR_SIZE + 2);
      upper (sx, sa, sb, sc, sd, OUR_SIZE + 2);
      upper (gx, ga, gb, gc, gd, OUR_SIZE + 2);
      lower (x, a, b, c, d, 1);
      lower (sx, sa, sb, sc, sd, 1);
      bp1 (*x);
      lower (gx, ga, gb, gc, gd, 1);

      free (x);
      free (a);
      free (b);
      free (c);
      free (d);
    }
  return 0;
}
示例#2
0
int
main (void)
{
  if (have_mpx ())
    {
      T *a = NULL;

      a = calloc (SIZE, sizeof (T));	/* after-decl */
#if defined  __GNUC__ && !defined __INTEL_COMPILER
      __bnd_store_ptr_bounds (a, &a);
#endif

      foo (a);				/* after-alloc */
      free (a);
    }
  return 0;
}