diff options
Diffstat (limited to 'gcc/real.c')
-rw-r--r-- | gcc/real.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/real.c b/gcc/real.c index 631bee01807..3a3f4be50ba 100644 --- a/gcc/real.c +++ b/gcc/real.c @@ -248,7 +248,12 @@ unknown arithmetic type #define MAXDECEXP 4932 #define MINDECEXP -4956 #define GET_REAL(r,e) bcopy ((char *) r, (char *) e, 2*NE) -#define PUT_REAL(e,r) bcopy ((char *) e, (char *) r, 2*NE) +#define PUT_REAL(e,r) \ +do { \ + if (2*NE < sizeof(*r)) \ + bzero((char *)r, sizeof(*r)); \ + bcopy ((char *) e, (char *) r, 2*NE); \ +} while (0) #else /* no XFmode */ #if LONG_DOUBLE_TYPE_SIZE == 128 #define NE 10 |