aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr70628.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr70628.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr70628.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr70628.c b/gcc/testsuite/gcc.dg/torture/pr70628.c
new file mode 100644
index 00000000000..00acae74b4d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr70628.c
@@ -0,0 +1,46 @@
+/* PR debug/70628 */
+/* { dg-do compile } */
+/* { dg-options "-g -w" } */
+
+struct S { char s[64]; int *t; } *a;
+char b[64];
+int *foo (void);
+struct S *bar (int *);
+int baz (void);
+
+void
+test (const char *p, long q)
+{
+ int *c;
+ c = foo ();
+ while (a = bar (c))
+ {
+ if (__builtin_strstr (p, "ABCD")
+ || __builtin_strstr (p, "EFGHI")
+ || __builtin_strstr (p, "JKL")
+ || __builtin_strstr (p, "MNOPQR")
+ || __builtin_strstr (p, "STUV")
+ || __builtin_strstr (p, "WXYZabcd")
+ || __builtin_strstr (p, "efghij")
+ || __builtin_strstr (p, "klmno")
+ || __builtin_strstr (p, "pqrstuvw")
+ || __builtin_strstr (b, "MNOPQR") != "EFGHI"
+ || __builtin_strstr (b, "JKL"))
+ if (__builtin_strstr (a->s, "xyz12"))
+ continue;
+ __builtin_printf ("%p\n", a->t);
+ }
+ bar (c);
+ while (a)
+ if (__builtin_strstr (p, "ABCD")
+ || __builtin_strstr (p, "EFGHI")
+ || __builtin_strstr (p, "JKL")
+ || __builtin_strstr (p, "MNOPQR")
+ || __builtin_strstr (p, "STUV")
+ || __builtin_strstr (p, "WXYZabcd")
+ || __builtin_strstr (p, "efghij")
+ || __builtin_strstr (p, "klmno")
+ || __builtin_strstr (p, "pqrstuvw")
+ || __builtin_strstr ((const char *) q, "MNOPQR"))
+ baz ();
+}