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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O2" }
3
 
4
typedef __complex__ double Value;
5
struct LorentzVector
6
{
7
  LorentzVector & operator+=(const LorentzVector & a) {
8
    theX += a.theX;
9
    theY += a.theY;
10
    theZ += a.theZ;
11
    theT += a.theT;
12
    return *this;
13
  }
14
 
15
  Value theX;
16
  Value theY;
17
  Value theZ;
18
  Value theT;
19
};
20
 
21
inline LorentzVector
22
operator+(LorentzVector a, const LorentzVector & b) {
23
  return a += b;
24
}
25
 
26
Value ex, et;
27
LorentzVector sum() {
28
  LorentzVector v1; v1.theX =ex; v1.theY =ex+et; v1.theZ =ex-et;   v1.theT =et;
29
  return v1+v1;
30
}

powered by: WebSVN 2.1.0

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