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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [pr18084-1.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
// { dg-do run }
2
// { dg-options "-O3" }
3
 
4
extern "C" void abort (void);
5
 
6
struct X {
7
    bool init;
8
    void foo() { if (!init) init = true; }
9
    void bar() { foo();                  }
10
 
11
};
12
 
13
typedef unsigned long long int uint64_t;
14
uint64_t mask1, mask2;
15
 
16
uint64_t calc() {
17
  return mask1 & mask2;
18
}
19
 
20
int main()
21
{
22
  mask1 = 0x00000000FFFFFFFFull;
23
  mask2 = 0x000000000000FFFFull;
24
  uint64_t value = calc();
25
 
26
  X().bar();
27
 
28
  if(value != calc())
29
    abort ();
30
  return 0;
31
}
32
 

powered by: WebSVN 2.1.0

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