summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr25481.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr25481.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr25481.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr25481.c b/gcc/testsuite/gcc.dg/torture/pr25481.c
new file mode 100644
index 000000000..3072e5ecb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr25481.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+struct s {
+ int *blah;
+};
+
+static struct s array[] = {
+ { 0 }
+};
+
+void
+foo (struct s *p)
+{
+ unsigned int n = 1;
+ struct s *q = &array[n];
+ while (p < q)
+ p++;
+}