This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Patch for gcc.c-torture/execute/ieee/20010226-1.c
- From: "D.Venkatasubramanian, Noida" <dvenkat at noida dot hcltech dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: "'gcc at gcc dot gnu dot org'" <gcc at gcc dot gnu dot org>
- Date: Mon, 23 Sep 2002 15:54:31 +0530
- Subject: Patch for gcc.c-torture/execute/ieee/20010226-1.c
Dear All,
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?
Thanks and regards,
Venky
Entry for Change Log
Mon Sep 23 15:50:51 IST 2002 D.Venkatasubramanian
<dvenkat@noida.hcltech.com>
* gcc.c-torture/execute/20010226-1.c (main): If double isn't at
least
8 bytes, the test case should exit, since, 4 byte doubles do not
have
enough significand bits for the test case to complete successfully.
*** gcc.c-torture/execute/ieee/20010226-1.c Fri Aug 16 15:48:14 2002
--- 20010226-1.c.modified Mon Sep 23 16:03:45 2002
*************** int main( )
*** 7,12 ****
--- 7,17 ----
{
m1 = dfrom / 2.0;
+ /* 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);
+
m2 = m1 * 4294967296.0;
mant_long = ((unsigned long) m2) & 0xffffffff;
____________________________________________________________________________
_