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]

RFA: Fix ICE in MN10300's address_cost function


Hi Jeff, Hi Alex,

  Currently the mn10300-elf toolchain is failing to build newlib
  because of this failure:

    newlib/libc/stdlib/dtoa.c: In function '_dtoa_r':
    newlib/libc/stdlib/dtoa.c:862:1: internal compiler error:
      in mn10300_address_cost_1, at config/mn10300/mn10300.c:2034
    Please submit a full bug report,

  The problem is that the address cost function is not handling
  CONST_DOUBLES.  I was not sure what the cost should be for these
  values, but the patch below gives them the same cost as a CONST.

  With the patch applied the newlib library now builds.

  OK to apply ?

Cheers
  Nick

PS.  There are quite a few more MN10300 patches on the way...

gcc/ChangeLog
2009-09-30  Nick Clifton  <nickc@redhat.com>

	* config/mn10300/mn10300.c (mn10300_address_cost_1): Treat
	CONST_DOUBLEs like CONSTs.

Index: gcc/config/mn10300/mn10300.c
===================================================================
--- gcc/config/mn10300/mn10300.c	(revision 152323)
+++ gcc/config/mn10300/mn10300.c	(working copy)
@@ -2025,6 +2025,7 @@
 	return 5;
       return 7;
 
+    case CONST_DOUBLE:
     case CONST:
     case SYMBOL_REF:
     case LABEL_REF:


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