real.c (asctoeg): Handle denormals in hexadecimal notation.
* real.c (asctoeg): Handle denormals in hexadecimal notation. * gcc.dg/20030217-1.c: New test. From-SVN: r63069
This commit is contained in:
parent
7db028d8e1
commit
b74899f7f3
|
@ -1,3 +1,7 @@
|
|||
2003-02-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* real.c (asctoeg): Handle denormals in hexadecimal notation.
|
||||
|
||||
2003-02-16 Arend Bayer <arend.bayer@web.de>
|
||||
Richard Henderson <rth@redhat.com>
|
||||
|
||||
|
|
|
@ -5417,7 +5417,12 @@ read_expnt:
|
|||
if (lexp > 0x7fff)
|
||||
goto infinite;
|
||||
if (lexp < 0)
|
||||
goto zero;
|
||||
{
|
||||
if (lexp < -NBITS)
|
||||
goto zero;
|
||||
lost |= eshift (yy, lexp);
|
||||
lexp = 0;
|
||||
}
|
||||
yy[E] = lexp;
|
||||
goto expdon;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2003-02-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.dg/20030217-1.c: New test.
|
||||
|
||||
2003-02-10 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
/* Test whether denormal floating point constants in hexadecimal notation
|
||||
are parsed correctly. */
|
||||
/* { dg-do run { target i?86-*-linux* x86_64-*-* } } */
|
||||
/* { dg-options "-std=c99" } */
|
||||
|
||||
long double d = 0x0.0000003ffffffff00000p-16357L;
|
||||
long double e = 0x0.0000003ffffffff00000p-16356L;
|
||||
|
||||
extern void abort (void);
|
||||
extern void exit (int);
|
||||
|
||||
int
|
||||
main (void)
|
||||
{
|
||||
if (d != e / 2.0)
|
||||
abort ();
|
||||
exit (0);
|
||||
}
|
Loading…
Reference in New Issue