OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [debug/] [debug-5.c] - Blame information for rev 867

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* 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
 
5
extern void abort (void);
6
 
7
struct A { char *a, *b, *c, *d; };
8
 
9
static int
10
bar (struct A *x)
11
{
12
  return x->c - x->b;
13
}
14
 
15
static int
16
bar2 (struct A *x)
17
{
18
  int a = x->c - x->b;
19
  x->c += 26;
20
  return a;
21
}
22
 
23
void fnptr (void (*fn) (void));
24
 
25
void
26
foo (void)
27
{
28
  struct A e;
29
 
30
  if (bar2 (&e) < 0)
31
    abort ();
32
  {
33
    void baz (void)
34
      {
35
        bar (&e);
36
      }
37
    fnptr (baz);
38
  }
39
  {
40
    struct A *f;
41
 
42
    f = &e;
43
    if (f->c - f->a > f->d - f->a)
44
      f->c = f->d;
45
  }
46
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.