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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [goto1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
extern "C" void abort ();
2
 
3
static int count;
4
 
5
struct S {
6
  S() { ++count; }
7
  ~S() { --count; }
8
};
9
 
10
int foo(int p)
11
{
12
  S s1;
13
  {
14
    S s2;
15
    if (p)
16
      goto L;
17
    else
18
      return 1;
19
  }
20
  foo (p);
21
 L:
22
  return 0;
23
}
24
 
25
int main()
26
{
27
  foo(0);
28
  if (count != 0)
29
    abort ();
30
  foo(1);
31
  if (count != 0)
32
    abort ();
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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