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/] [pr24665.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
// { dg-do compile }
2
// { dg-options "-O2" }
3
 
4
typedef unsigned long T;
5
typedef volatile T* const hwreg_t;
6
struct RegisterLayout
7
{
8
    T intmask;
9
};
10
struct Controller_t
11
{
12
    Controller_t();
13
    inline void
14
    disableInterrupt()
15
    {
16
        *mpMaskRegister = 0;
17
    };
18
    static hwreg_t mpMaskRegister;
19
};
20
 
21
extern char SimulatedRegisters[];
22
 
23
hwreg_t Controller_t::mpMaskRegister
24
  = &(reinterpret_cast(SimulatedRegisters))->intmask;
25
 
26
Controller_t::Controller_t()
27
{
28
    disableInterrupt();
29
}

powered by: WebSVN 2.1.0

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