aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/const-compare.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/const-compare.c')
-rw-r--r--gcc/testsuite/gcc.dg/const-compare.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/const-compare.c b/gcc/testsuite/gcc.dg/const-compare.c
new file mode 100644
index 00000000000..f0e30d89e1e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/const-compare.c
@@ -0,0 +1,30 @@
+/* APPLE LOCAL begin radar 3869444 */
+/* { dg-do compile { target "powerpc*-*-darwin*" } } */
+/* { dg-options "-m64 -O1 -static" } */
+typedef unsigned long long uint64_t;
+
+static int
+match(name, pat)
+ uint64_t *name, *pat;
+{
+ int ok=0, negate_range;
+ uint64_t c, k;
+
+ c = *pat++;
+ switch (c & 0xffffffffffULL) {
+ case ((uint64_t)(('[')|0x8000000000ULL)):
+ if ((negate_range = ((*pat & 0xffffffffffULL) == ((uint64_t)(('!')|0x8000000000ULL)) )) != '\0')
+ ++pat;
+ while (((c = *pat++) & 0xffffffffffULL) )
+ if ((*pat & 0xffffffffffULL) == ((uint64_t)(('-')|0x8000000000ULL)))
+ {
+ pat += 2;
+ }
+
+ if (ok == negate_range)
+ return(0);
+ break;
+ }
+ return(*name == '\0');
+}
+/* APPLE LOCAL end radar 3869444 */