OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gcc.dg/] [debug/] [debug-5.c] - Rev 384

Compare with Previous | Blame | View Log

/* This testcase failed, because scope containing baz was deleted
   (spanned 0 basic blocks) and DWARF-2 couldn't find baz origin.  */
/* { dg-do compile } */
/* { dg-require-effective-target trampolines } */
 
extern void abort (void);
 
struct A { char *a, *b, *c, *d; };
 
static int
bar (struct A *x)
{
  return x->c - x->b;
}
 
static int
bar2 (struct A *x)
{
  int a = x->c - x->b;
  x->c += 26;
  return a;
}
 
void fnptr (void (*fn) (void));
 
void
foo (void)
{
  struct A e;
 
  if (bar2 (&e) < 0)
    abort ();
  {
    void baz (void)
      {
	bar (&e);
      }
    fnptr (baz);
  }
  {
    struct A *f;
 
    f = &e;
    if (f->c - f->a > f->d - f->a)
      f->c = f->d;
  }
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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