summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr24683.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr24683.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr24683.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr24683.c b/gcc/testsuite/gcc.dg/pr24683.c
new file mode 100644
index 000000000..79d321006
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr24683.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-O2 -fPIC" } */
+int *block;
+void final(unsigned int j)
+{
+ unsigned int i;
+ unsigned char *data = (unsigned char *)"\0";
+ for (i = 0; i < 8; i++)
+ for (; j + 63 < 1; j += 64)
+ block = (int *) &data[j];
+}