Commit be1c3b28 by Sebastian Pop Committed by Sebastian Pop

Add testcase for PR42930.

2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>

	* g++.dg/graphite/pr42930.C: New.

From-SVN: r156715
parent 141ecc24
2010-02-10 Sebastian Pop <sebastian.pop@amd.com> 2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
* graphite.c (graphite_transform_loops): Re-enable dbg_cnt.
2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
* g++.dg/graphite/pr42930.C: New.
2010-02-10 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/42930 PR middle-end/42930
* graphite-scop-detection.c (graphite_can_represent_scev): Call * graphite-scop-detection.c (graphite_can_represent_scev): Call
graphite_can_represent_init for MULT_EXPR. graphite_can_represent_init for MULT_EXPR.
......
/* { dg-options "-O1 -floop-block" } */
typedef unsigned char byte;
typedef unsigned int uint;
typedef unsigned char uint8;
namespace Common {
class NonCopyable {
};
template<class In, class Out>
Out copy(In first, In last, Out dst) {
while (first != last)
*dst++ = *first++;
}
template<class T>
class Array {
uint _size;
T *_storage;
public:
Array<T>& operator=(const Array<T> &array) {
copy(array._storage, array._storage + _size, _storage);
}
};
}
namespace Graphics {
struct PixelFormat {
inline PixelFormat() {
}
inline PixelFormat(byte BytesPerPixel,
byte RBits, byte GBits, byte BBits, byte ABits,
byte RShift, byte GShift, byte BShift, byte AShift) {
}
};
};
namespace Cine {
static const Graphics::PixelFormat kLowPalFormat(2, 3, 3, 3, 0, 8, 4, 0, 0);
class Palette {
public:
struct Color {
uint8 r, g, b;
};
Palette(const Graphics::PixelFormat format = Graphics::PixelFormat(), const uint numColors = 0);
bool empty() const;
bool isValid() const;
Common::Array<Color> _colors;
};
class FWRenderer : public Common::NonCopyable {
Cine::Palette _activePal;
void drawCommand();
};
void FWRenderer::drawCommand() {
if (!_activePal.isValid() || _activePal.empty()) {
_activePal = Cine::Palette(kLowPalFormat, 16);
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment