This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
SH fix silly typo in OVERRIDE_OPTIONS
- From: Graham Stott <graham dot stott at btinternet dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Feb 2003 20:47:55 +0000
- Subject: SH fix silly typo in OVERRIDE_OPTIONS
All,
While building a sh64-elf toolchain I found that the built cc1 was
segfaulting on all input because targetm.address_cost was NULL which
shouldn't be the case because it's correctly statically initialised
in sh.c!
Something odd was definately up.
It turned out it was a silly typo in OVERRIDE_OPTIONS in the initialisation
of reg_class_from_letter which only occurs of TARGET_FMOVD is true.
The attached patch fixes the segfault
OK to commit mainline?
I suspect it's also needed for 3.3 but I don't have that branch
checked out.
Graham
ChangeLog
* config/sh/sh.h (OVERRIDE_OPTIONS): Fix typo.
----------------------------------------------------------------------
Index: sh.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/sh/sh.h,v
retrieving revision 1.189
diff -c -p -r1.189 sh.h
*** sh.h 31 Jan 2003 23:34:17 -0000 1.189
--- sh.h 12 Feb 2003 20:30:06 -0000
*************** do { \
*** 456,462 ****
targetm.asm_out.unaligned_op.di = NULL; \
} \
if (TARGET_FMOVD) \
! reg_class_from_letter['e'] = NO_REGS; \
\
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \
if (! VALID_REGISTER_P (regno)) \
--- 456,462 ----
targetm.asm_out.unaligned_op.di = NULL; \
} \
if (TARGET_FMOVD) \
! reg_class_from_letter['e' - 'a'] = NO_REGS; \
\
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++) \
if (! VALID_REGISTER_P (regno)) \
-------------------------------------------------------------------------