This is the mail archive of the
mailing list for the GCC project.
Re: [Patch/testsuite] : gcc.dg/compat/struct-layout-1_generate.c fixes
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Danny Smith <danny_smith_0000 at yahoo dot co dot nz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Janis Johnson <janis187 at us dot ibm dot com>
- Date: Mon, 1 Nov 2004 03:30:43 -0500
- Subject: Re: [Patch/testsuite] : gcc.dg/compat/struct-layout-1_generate.c fixes
- References: <firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Nov 01, 2004 at 09:19:33PM +1300, Danny Smith wrote:
> Two problems I ran into with testsuite/gcc.dg/compat/struct-layout-1_generate.c
> 1) ffsll() is not available on all targets. We could supply a my_ffsll but
> __builtin_ffsll does the job too.
This is IMO not ok. gcc.dg/compat should be buildable even with older
compilers, so that one can compare compatibility easily. It is not as bad
because it is in the generator only, but still you from time to time want to
just pack up the whole gcc.dg/compat tree and use it e.g. in GCC 3.3 or
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
mi = __builtin_ffsll (...) - 1;
mi = ffsll (...) - 1;
or write my_ffsll.
> 2) When trying to track individual failures using #define DBG = 1, stdout
> isn't necessarily flushed when abort is called, so we lose the test
This is ok with me.
> 2004-11-01 Danny Smith <email@example.com>
> * gcc.dg/compat/struct-layout-1_generate.c (main): Generate a
> call to fflush(stdout) before abort.
> (generate_fields): Use __builtin_ffsll.