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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [debug/] [pr46123.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR debug/46123
2
// { dg-do compile }
3
// { dg-options "-g -feliminate-dwarf2-dups" }
4
 
5
struct foo
6
{
7
  static int bar ()
8
  {
9
    int i;
10
    static int baz = 1;
11
    {
12
      static int baz = 2;
13
      i = baz++;
14
    }
15
    {
16
      struct baz
17
      {
18
        static int m ()
19
        {
20
          static int n;
21
          return n += 10;
22
        }
23
      };
24
      baz a;
25
      i += a.m ();
26
    }
27
    {
28
      static int baz = 3;
29
      i += baz;
30
      baz += 30;
31
    }
32
    i += baz;
33
    baz += 60;
34
    return i;
35
  }
36
};
37
 
38
int main ()
39
{
40
  foo x;
41
 
42
  if (x.bar () != 16)
43
    return 1;
44
  if (x.bar() != 117)
45
    return 1;
46
  return 0;
47
}

powered by: WebSVN 2.1.0

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