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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [reg-stack.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// PR target/6087
2
// The code that moves around insns emitted by reg-stack to cope with
3
// exception edges lost the REG_DEAD note indicating a pop.  Which
4
// eventually fills up the register stack resulting in Z == NaN.
5
 
6
// { dg-do run }
7
// { dg-options "-O" }
8
 
9
extern "C" void abort ();
10
 
11
struct Base
12
{
13
  virtual ~Base() {}
14
};
15
 
16
struct Foo : public Base
17
{
18
  Foo ();
19
};
20
 
21
double x = 3;
22
double y = 4;
23
 
24
double bar ()
25
{
26
  double z = x*x+y*y;
27
  if (z != 25.0)
28
    throw 1;
29
  return z;
30
}
31
 
32
Foo::Foo ()
33
{
34
  bar ();
35
}
36
 
37
int main ()
38
{
39
  try {
40
    int i;
41
    for (i = 0; i < 10; ++i)
42
      new Foo;
43
  } catch (...) {
44
    abort ();
45
  }
46
  return 0;
47
}

powered by: WebSVN 2.1.0

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