This is the mail archive of the
mailing list for the GCC project.
Re: [testsuite,committed] Fix 16-bit int test (PR52641)
- From: Georg-Johann Lay <avr at gjlay dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Jeff Law <law at redhat dot com>
- Date: Mon, 04 Mar 2013 12:36:27 +0100
- Subject: Re: [testsuite,committed] Fix 16-bit int test (PR52641)
- References: <firstname.lastname@example.org> <20130304112005.GM12913@tucnak.redhat.com>
Jakub Jelinek wrote:
> On Mon, Mar 04, 2013 at 12:15:31PM +0100, Georg-Johann Lay wrote:
>> Fixed this test case that assumed int is always 32 bits at least.
>> PR testsuite/52641
>> PR tree-optimization/52631
>> * gcc.dg/tree-ssa/pr52631.c: Fix 16-bit int.
>> --- gcc.dg/tree-ssa/pr52631.c (revision 196329)
>> +++ gcc.dg/tree-ssa/pr52631.c (working copy)
>> @@ -3,7 +3,11 @@
>> unsigned f(unsigned a)
>> +#if __SIZEOF_INT__ == 2
>> + unsigned b = a >> 15;
>> unsigned b = a >> 31;
> So perhaps better
> unsigned b = a >> (__SIZEOF_INT__ * __CHAR_BIT__ - 1);
Yes, maybe. I just fixed the int=16 case, dunno what the optimization pass is
supposed to do with 64-bit integers...