view gcc/testsuite/gcc.dg/pr45105.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

/* PR debug/45105 */
/* { dg-do compile } */
/* { dg-options "-Os -fcompare-debug" } */

extern int *baz (int *, int *);

void
bar (int *p1, int *p2)
{
  int n = *baz (0, 0);
  p1[n] = p2[n];
}

void
foo (int *p, int l)
{
  int a1[32];
  int a2[32];
  baz (a1, a2);
  while (l)
    {
      if (l & 1)
	p = baz (a2, p);
      l--;
      bar (a1, a2);
    }
}