aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/pr52549.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr52549.c b/gcc/testsuite/gcc.dg/pr52549.c
index 89ec2aa..382f77d 100644
--- a/gcc/testsuite/gcc.dg/pr52549.c
+++ b/gcc/testsuite/gcc.dg/pr52549.c
@@ -1,6 +1,13 @@
/* { dg-do compile } */
+#if __SIZEOF_POINTER__ == __SIZEOF_LONG__
_mark (long obj, int i, char *a)
{
(char *)&(((long *)(obj)) [i]) - a;
}
+#elif __SIZEOF_POINTER__ == __SIZEOF_INT__
+_mark (int obj, int i, char *a)
+{
+ (char *)&(((int *)(obj)) [i]) - a;
+}
+#endif