MIPS PATCH: fix ICE inside mips_set_current_function

Richard Sandiford richard@codesourcery.com
Thu Sep 6 18:08:00 GMT 2007


Sandra Loosemore <sandra@codesourcery.com> writes:
> 	gcc/
> 	* config/mips/mips.c:  Include diagnostic.h.
> 	(mips_set_current_function): Check errorcount and sorrycount
> 	before generating RTL.

OK.  I was going to suggest it should be done by the caller instead,
but I suppose the reliance on DECL_RTL is MIPS-specific.  It might be
technically better to fall back on non-mips16 mode instead, because
selecting mips16 mode for a nomips16 function is likely to lead to some
strange secondary errors, such as complaints about using DSP functions.
(This could happen to nomips16 functions that are completely unrelated
to the reported error.)  I was going to suggest using mips_mips16_type_p
or mips_nomips16_type_p, but I suppose we have to cope with the case
where the fndecl's type is erroneous.

Richard



More information about the Gcc-patches mailing list