public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix VAX crash
@ 2002-11-05 23:07 Jason R Thorpe
  2002-11-06 11:31 ` Graham Stott
  0 siblings, 1 reply; 11+ messages in thread
From: Jason R Thorpe @ 2002-11-05 23:07 UTC (permalink / raw)
  To: gcc-patches; +Cc: rth

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

Richard...

In reference to:

	http://gcc.gnu.org/ml/gcc-bugs/2002-11/msg00244.html

...your REAL_TO_DECIMAL -> real_to_decimal change seems to be
the culprit.  The attached patch prevents the compiler from crashing,
although it's not clear to me why real_to_decimal isn't obeying
the passed-in buffer size..?

	* config/vax/vax.h (PRINT_OPERAND): Increase size of buffer
	provided to real_to_decimal.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>

[-- Attachment #2: vax-real-patch --]
[-- Type: text/plain, Size: 1534 bytes --]

Index: config/vax/vax.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/vax/vax.h,v
retrieving revision 1.54
diff -c -r1.54 vax.h
*** config/vax/vax.h	22 Oct 2002 23:05:24 -0000	1.54
--- config/vax/vax.h	6 Nov 2002 07:05:01 -0000
***************
*** 1212,1223 ****
    else if (GET_CODE (X) == MEM)						\
      output_address (XEXP (X, 0));					\
    else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode)	\
!     { char dstr[30];							\
        real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X),		\
  		       sizeof (dstr), 0, 1);				\
        fprintf (FILE, "$0f%s", dstr); }					\
    else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode)	\
!     { char dstr[30];							\
        real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X),		\
  		       sizeof (dstr), 0, 1);				\
        fprintf (FILE, "$0%c%s", ASM_DOUBLE_CHAR, dstr); }		\
--- 1212,1223 ----
    else if (GET_CODE (X) == MEM)						\
      output_address (XEXP (X, 0));					\
    else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == SFmode)	\
!     { char dstr[50];							\
        real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X),		\
  		       sizeof (dstr), 0, 1);				\
        fprintf (FILE, "$0f%s", dstr); }					\
    else if (GET_CODE (X) == CONST_DOUBLE && GET_MODE (X) == DFmode)	\
!     { char dstr[50];							\
        real_to_decimal (dstr, CONST_DOUBLE_REAL_VALUE (X),		\
  		       sizeof (dstr), 0, 1);				\
        fprintf (FILE, "$0%c%s", ASM_DOUBLE_CHAR, dstr); }		\

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2002-11-15 21:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-05 23:07 [PATCH] Fix VAX crash Jason R Thorpe
2002-11-06 11:31 ` Graham Stott
2002-11-06 14:31   ` Richard Henderson
2002-11-06 17:11     ` Graham Stott
2002-11-07 10:22       ` Richard Henderson
2002-11-07 10:30         ` Graham Stott
2002-11-07 10:32           ` Richard Henderson
2002-11-07 10:40             ` Graham Stott
2002-11-07 11:08               ` Richard Henderson
2002-11-08 11:10                 ` Graham Stott
2002-11-15 13:12                   ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).