aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2009-10-14 00:01:37 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2009-10-14 00:01:37 +0000
commit26352f47241ad682ee92fef24a2c5f138ddfea8f (patch)
tree79e9b01cb2ad6657259f0bb8cab6b9fbc7f64692 /gcc/testsuite
parent83907fddfa147786b3e1723007d6d3fb7c4bbc20 (diff)
downloadgcc-26352f47241ad682ee92fef24a2c5f138ddfea8f.zip
gcc-26352f47241ad682ee92fef24a2c5f138ddfea8f.tar.gz
gcc-26352f47241ad682ee92fef24a2c5f138ddfea8f.tar.bz2
re PR rtl-optimization/38948 (unrecognizable insn, postreload.c:395)
PR target/38948 * gcc.dg/torture/pr38948.c: New test. From-SVN: r152741
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr38948.c101
2 files changed, 106 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 3fd94d4..55a49e9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-14 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/38948
+ * gcc.dg/torture/pr38948.c: New test.
+
2009-10-13 Steve Ellcey <sje@cup.hp.com>
* gfortran.dg/vect/fast-math-pr38968.f90: Add timeout.
diff --git a/gcc/testsuite/gcc.dg/torture/pr38948.c b/gcc/testsuite/gcc.dg/torture/pr38948.c
new file mode 100644
index 0000000..98ed493
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr38948.c
@@ -0,0 +1,101 @@
+/* { dg-options "-fno-tree-sra" } */
+/* { dg-options "-fno-tree-sra -march=v32" { target cris-*-* } } */
+typedef unsigned char byte;
+typedef unsigned int uint;
+typedef int bool;
+typedef struct gs_const_string_s
+{
+ const byte *data;
+}
+gs_const_string;
+struct gs_matrix_s
+{
+ float xx, xy, yx, yy, tx, ty;
+};
+typedef struct gs_matrix_s gs_matrix;
+typedef long fixed;
+typedef struct gs_fixed_point_s
+{
+ fixed x, y;
+}
+gs_fixed_point;
+typedef struct gs_matrix_fixed_s
+{
+ int x;
+}
+gs_matrix_fixed;
+static int
+append_simple (const byte * glyph, const gs_matrix_fixed * pmat, void * ppath)
+{
+ int numContours =
+ (int) (((((uint) ((glyph)[0]) << 8) + (glyph)[1]) ^ 0x8000) - 0x8000);
+ const byte *pends = glyph + 10;
+ int code = 0;
+ {
+ uint i = 0;
+ uint np = 0;
+ gs_fixed_point pt = {0};
+ uint reps = 0;
+ for (i = 0, np = 0; i < numContours; ++i)
+ {
+ bool move = ((bool) 1);
+ uint last_point =
+ (((uint) ((pends + i * 2)[0]) << 8) + (pends + i * 2)[1]);
+ int off_curve = 0;
+ gs_fixed_point cpoints[3];
+ for (; np <= last_point; --reps, ++np)
+ {
+ if (move)
+ {
+ cpoints[0] = pt;
+ move = ((bool) 0);
+ }
+ else
+ {
+ switch (off_curve++)
+ {
+ default:
+ cpoints[2].x = ((cpoints[1].x + pt.x) / 2);
+ cpoints[2].y = ((cpoints[1].y + pt.y) / 2);
+ code =
+ gx_path_add_curve_notes (ppath,
+ ((cpoints[0].x +
+ 2 * cpoints[1].x) / 3),
+ ((cpoints[0].y +
+ 2 * cpoints[1].y) / 3),
+ ((2 * cpoints[1].x +
+ cpoints[2].x) / 3),
+ ((2 * cpoints[1].y +
+ cpoints[2].y) / 3),
+ cpoints[2].x, cpoints[2].y,
+ 0);
+ cpoints[0] = cpoints[2];
+ case 0:
+ cpoints[1] = pt;
+ }
+ }
+ }
+ }
+ }
+}
+int
+append_outline (uint glyph_index, const gs_matrix_fixed *pmat, void *ppath)
+{
+ gs_const_string glyph_string = {0};
+ int numContours = 0;
+ numContours =
+ (int) (((((uint) ((glyph_string.data)[0]) << 8) +
+ (glyph_string.data)[1]) ^ 0x8000) - 0x8000);
+ if (numContours >= 0)
+ return append_simple (glyph_string.data, pmat, ppath);
+ {
+ uint flags = 0;
+ do
+ {
+ gs_matrix_fixed mat = {0};
+ gs_matrix scale_mat = {0};
+ gs_matrix_multiply (&scale_mat, (const gs_matrix *) &mat, (gs_matrix *) & mat);
+ }
+ while (flags & 32);
+ }
+}