1// { dg-do compile }
2typedef unsigned char uint8;
3typedef unsigned int uint32;
4class PixelARGB {
5public:
6    ~PixelARGB() throw() { }
7    PixelARGB (const uint32 argb_) throw() : argb (argb_)     { }
8    inline __attribute__((always_inline)) uint8 getRed() const throw() {
9	return components.r;
10    }
11    union     {
12	uint32 argb;
13	struct         {
14	    uint8 b, g, r, a;
15	} components;
16    };
17};
18class Colour {
19public:
20    Colour() throw() : argb (0) {};
21    uint8 getRed() const throw() {
22	return argb.getRed();
23    }
24    PixelARGB argb;
25};
26uint8 writeImage (void) {
27    Colour pixel;
28    pixel = Colour ();
29    return pixel.getRed();
30}
31