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
Jakub Jelinek <jakub@redhat.com> writes:
> 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.
Thanks for catching that. I prefer "-w", since this is a test
for an ICE. Is the patch OK with that change?
Richard