This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.4 only] PR c/22589: ICE on casting to long long
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, gdr at integrable-solutions dot net, richard at codesourcery dot com
- Date: Wed, 27 Jul 2005 16:08:10 -0400
- Subject: Re: [3.4 only] PR c/22589: ICE on casting to long long
- References: <87ek9k10j5.fsf@talisman.home>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Jul 27, 2005 at 09:01:18PM +0100, Richard Sandiford wrote:
> *** /dev/null 2005-06-16 22:49:09.000000000 +0100
> --- testsuite/gcc.dg/pr22589-1.c 2005-07-27 20:26:36.000000000 +0100
> ***************
> *** 0 ****
> --- 1,5 ----
> + /* { dg-options "" } */
> + int bar (char *foo)
> + {
> + return (long long) ((int) foo + 0) < 0;
> + }
The test will fail on 64-bit architectures with:
warning: cast from pointer to integer of different size
IMHO either use dg-options "-w", or
/* { dg-require-effective-target ilp32 } */
or cast to long instead of int.
Jakub