This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch/testsuite] : gcc.dg/compat/struct-layout-1_generate.c fixes

On Mon, Nov 01, 2004 at 09:19:33PM +1300, Danny Smith wrote:
> Hello,
> 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
Either use:
#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
> identifiers.

This is ok with me.

> 2004-11-01  Danny Smith  <>
> 	* gcc.dg/compat/struct-layout-1_generate.c (main): Generate a
> 	call to fflush(stdout) before abort.
> 	(generate_fields): Use __builtin_ffsll.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]