From e65a47c96faac32fd0259b0050fd91cc60bcf71c Mon Sep 17 00:00:00 2001 From: bonzini Date: Wed, 11 Feb 2004 11:53:38 +0000 Subject: [PATCH] * gcc.dg/pr14092-1.c: Use intptr_t for the cast. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77649 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.dg/pr14092-1.c | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d49569a3833..9f34aae5386 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2004-02-11 Paolo Bonzini + + * gcc.dg/pr14092-1.c: Use intptr_t for the cast. + 2004-02-11 Hartmut Penner * gcc.dg/ppc64-abi-3.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr14092-1.c b/gcc/testsuite/gcc.dg/pr14092-1.c index 86076c241e0..927ecf6aa3b 100644 --- a/gcc/testsuite/gcc.dg/pr14092-1.c +++ b/gcc/testsuite/gcc.dg/pr14092-1.c @@ -4,14 +4,17 @@ */ /* { dg-do compile } */ +/* Define this so that we are more portable. The testcase in the + PR failed on 64-bit hosts. */ +typedef int __attribute__ ((mode (__pointer__))) intptr_t; + typedef struct _PLCI { unsigned char x; unsigned char buf[1]; } PLCI; - void nl_ind(PLCI * plci) { - plci->x = -((int)(plci->buf)) & 3; + plci->x = -((intptr_t)(plci->buf)) & 3; } -- 2.11.4.GIT