aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/dwarf2/pr82718-1.c
blob: 809a00b63c6242eee2ac4b8e3060f8eeb9fe0444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/* PR debug/82718 */
/* { dg-do assemble } */
/* { dg-options "-O2 -gdwarf-5" } */
/* { dg-skip-if "AIX DWARF5" { powerpc-ibm-aix* } } */

extern int e;
extern long foo (int, void *, unsigned long, unsigned long);
struct S
{
  int f;
  unsigned long t, s;
};

static inline long
bv (int x, void *y, unsigned long z, unsigned long w)
{
  long a = 0;
  do
    {
      long g;
      do
	g = (long int) (foo (x, y + a, z - a, w + a));
      while (g == -1L && e == 9959);
      if (g <= 0)
	return g < 0 ? g : a;
      a += g;
    }
  while ((unsigned long) a < z);
  return a;
}

const char *
baz (struct S *x)
{
  unsigned long h = 8;
  char *j = 0;
  unsigned long z = x->f;
  if (__builtin_expect (!!((unsigned long) bv (x->f, j, z, x->t + h + 10) != z), 0))
    return 0;
  x->s = z;
  return j;
}