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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr42357.C] - Rev 307

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

// { dg-do compile }
typedef unsigned char uint8;
typedef unsigned int uint32;
class PixelARGB {
public:
    ~PixelARGB() throw() { }
    PixelARGB (const uint32 argb_) throw() : argb (argb_)     { }
    inline __attribute__((always_inline)) uint8 getRed() const throw() {
        return components.r;
    }
    union     {
        uint32 argb;
        struct         {
            uint8 b, g, r, a;
        } components;
    };
};
class Colour {
public:
    Colour() throw() : argb (0) {};
    uint8 getRed() const throw() {
        return argb.getRed();
    }
    PixelARGB argb;
};
uint8 writeImage (void) {
    Colour pixel;
    pixel = Colour ();
    return pixel.getRed();
}

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

powered by: WebSVN 2.1.0

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