aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090303-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090303-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090303-1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090303-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090303-1.c
new file mode 100644
index 000000000..18a3d91fd
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090303-1.c
@@ -0,0 +1,20 @@
+/* The array offset became 0x1ffffffffffffffe via a conversion from
+ signed to unsigned HOST_WIDE_INT, causing an ICE compiling for
+ Thumb. */
+
+int r (unsigned short *);
+void s (unsigned short *, unsigned short *);
+
+int
+f (int x)
+{
+ unsigned short a[1], c[1];
+
+ if (r (a))
+ return x;
+
+ if (c[-1])
+ s (a, c);
+
+ return 0;
+}