1 /* This testcase failed, because scope containing baz was deleted
2    (spanned 0 basic blocks) and DWARF-2 couldn't find baz origin.  */
3 /* { dg-do compile } */
4 /* { dg-require-effective-target trampolines } */
5 
6 extern void abort (void);
7 
8 struct A { char *a, *b, *c, *d; };
9 
10 static int
bar(struct A * x)11 bar (struct A *x)
12 {
13   return x->c - x->b;
14 }
15 
16 static int
bar2(struct A * x)17 bar2 (struct A *x)
18 {
19   int a = x->c - x->b;
20   x->c += 26;
21   return a;
22 }
23 
24 void fnptr (void (*fn) (void));
25 
26 void
foo(void)27 foo (void)
28 {
29   struct A e;
30 
31   if (bar2 (&e) < 0)
32     abort ();
33   {
34     void baz (void)
35       {
36 	bar (&e);
37       }
38     fnptr (baz);
39   }
40   {
41     struct A *f;
42 
43     f = &e;
44     if (f->c - f->a > f->d - f->a)
45       f->c = f->d;
46   }
47 }
48