]> gcc.gnu.org Git - gcc.git/commitdiff
Add testcase for PR42930.
authorSebastian Pop <sebastian.pop@amd.com>
Thu, 11 Feb 2010 19:43:05 +0000 (19:43 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Thu, 11 Feb 2010 19:43:05 +0000 (19:43 +0000)
2010-02-10  Sebastian Pop  <sebastian.pop@amd.com>

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

From-SVN: r156715

gcc/ChangeLog.graphite
gcc/testsuite/g++.dg/graphite/pr42930.C [new file with mode: 0644]

index 93e14fb021796cea6bf2cc2b6dc4f34258207b5c..b047c2b6e5b1e398d35e1db275146c230798bd81 100644 (file)
@@ -1,3 +1,11 @@
+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
diff --git a/gcc/testsuite/g++.dg/graphite/pr42930.C b/gcc/testsuite/g++.dg/graphite/pr42930.C
new file mode 100644 (file)
index 0000000..c1150ce
--- /dev/null
@@ -0,0 +1,55 @@
+/* { 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);
+ }
+}
+}
This page took 0.068076 seconds and 5 git commands to generate.