This is the mail archive of the gcc-patches@gcc.gnu.org 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 for gcc.c-torture/execute/ieee/20010226-1.c


On 23-Sep-2002, D.Venkatasubramanian, Noida <dvenkat@noida.hcltech.com> wrote:
> 
> I found the test case gcc.c-torture/execute/ieee/20010226-1.c failing on the
> h8300-elf target. On investigation, it was found that the test case expects
> the sizeof(long double) to have more than 4 bytes. On targets such as
> h8300-elf, the test case would thus fail.
> 
> I am submitting a patch, which would prevent the test case from failing for
> targets where long double sizes are deficient.
> 
> Is it okay?
> 
> +   /* Some targets may not support double precision floating point
> arithmetic,
> +    * this test case should pass for such targets. */
> +   if (sizeof(long double) <= 4)
> +     exit (0);

You are assuming 8-bit bytes here.

Consider a system in which char, short, int, long, and long double are
all 64 bits.  Then sizeof(long double) = 1.  But ideally we wouldn't
want to disable this test on such a system, would we?

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


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