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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [opt/] [mmx1.C] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
// PR optimization/4994
2
// This testcase ICEd because movsi was not supporting direct
3
// mmx -> mmx register moves.
4
// { dg-do compile }
5
// { dg-options "-O2" }
6
// { dg-options "-fno-exceptions -O2 -mmmx -fPIC" { target { { i?86-*-* x86_64-*-* } && ilp32 }  } }
7
 
8
struct A {
9
  unsigned a0;
10
  bool a1 () { return !--a0; }
11
  void a2 ();
12
};
13
 
14
struct B
15
{
16
  B ();
17
  B (const B &);
18
  ~B();
19
  B &operator= (const B &);
20
  B b0 (unsigned long x, int y = 0, int z = 10) const;
21
 
22
private:
23
  A *b1;
24
  static A *b2;
25
};
26
 
27
inline B::~B()
28
{
29
  if (b1->a1 () && b1 == b2)
30
    b1->a2();
31
}
32
 
33
struct C
34
{
35
  C *c0;
36
};
37
 
38
struct D
39
{
40
  C *d0;
41
  D ();
42
  D (const D &c0) {}
43
  D &operator++ () {
44
    C *x = d0; C *y = x->c0;
45
    while (x == y->c0)
46
      x = y;
47
    d0 = x;
48
    return *this;
49
  }
50
};
51
 
52
B foo (const char *x, const B &y);
53
 
54
void bar (void)
55
{
56
  B *y = 0;
57
  B z;
58
  for (unsigned long l = 0; l < 2147483647L * 2UL + 1; l++)
59
    {
60
      z = y->b0 (l);
61
      *y = foo ("data", z);
62
    }
63
  D d;
64
  ++d;
65
}

powered by: WebSVN 2.1.0

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