This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 5/5][testsuite] Use stdint.h when needing int of exact size
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Jul 2007 14:25:43 -0700
- Subject: Re: [PATCH 5/5][testsuite] Use stdint.h when needing int of exact size
- References: <20070724160434.GB4125@sygehus.dk> <20070724172453.GG4125@sygehus.dk>
- Reply-to: janis187 at us dot ibm dot com
On Tue, 2007-07-24 at 19:24 +0200, Rask Ingemann Lambertsen wrote:
> These testcases all rely on very specific integer sizes to pass. The
> vector tests assume the vectors have exactly four elements and simd-4.c
> additionally needs integers of exactly 32 bits and 64 bits. pr27743.c relies
> on sign extension of bit 31, so a signed 32-bit integer is required. This
> patch uses types from stdint.h to make sure that these requirements are
> met, also on targets where int gives you only 16 bits.
>
> Ok for trunk?
>
> :ADDPATCH testsuite:
>
> 2007-07-24 Rask Ingemann Lambertsen <rask@sygehus.dk>
>
> * gcc.dg/torture/pr27743.c (bar): Use an integer of exactly 32 bits
> where required.
> * gcc.c-torture/execute/simd-1.c: Likewise.
> * gcc.c-torture/execute/pr23135.c: Likewise.
> * gcc.c-torture/execute/simd-4.c (__ev_convert_s64)(main): Likewise.
> Use an integer of exactly 64 bits where required.
I agree with Andrew Pinski that you shouldn't change SImode in
these tests; it would be better to skip them for targets that
are not ILP32 or LP64. It's also not right to change the return
value of main to something other than int, so I'd recommend also
skipping that one if not ILP32 or LP64.
Janis