aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/debug/debug-4.c
blob: 62e824a548c0c66ffb510a04c6c47e2f92fd7cb7 (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
/* This testcase failed, because scope containing baz was not emitted
   (doesn't contain any instructions) and DWARF-2 couldn't find baz origin.  */
/* { dg-do compile } */

struct A { char *a, *b, *c, *d; };

static int
bar (struct A *x)
{
  return x->c - x->b;
}

void
foo (void)
{
  struct A e;

  {
    int baz (void)
      {
	return bar (&e);
      }
  }
  if (e.c - e.a > e.d - e.a)
    e.c = e.d;
}