2007-09-06 Sandra Loosemore <sandra@codesourcery.com>
gcc/
* config/mips/mips.c: Include diagnostic.h.
(mips_set_current_function): Check errorcount and sorrycount
before generating RTL.
From-SVN: r128200
+2007-09-06 Sandra Loosemore <sandra@codesourcery.com>
+
+ * config/mips/mips.c: Include diagnostic.h.
+ (mips_set_current_function): Check errorcount and sorrycount
+ before generating RTL.
+
2007-09-06 Richard Sandiford <richard@codesourcery.com>
PR target/33256
#include "sched-int.h"
#include "tree-gimple.h"
#include "bitmap.h"
+#include "diagnostic.h"
/* True if X is an unspec wrapper around a SYMBOL_REF or LABEL_REF. */
#define UNSPEC_ADDRESS_P(X) \
mips_set_current_function (tree fndecl)
{
int mips16p;
- if (fndecl)
+ if (errorcount || sorrycount)
+ /* Avoid generating RTL when fndecl is possibly invalid. Best to fall
+ back on non-MIPS16 mode to avoid any strange secondary errors about
+ use of unsupported features in MIPS16 mode. */
+ mips16p = false;
+ else if (fndecl)
mips16p = SYMBOL_REF_MIPS16_FUNC_P (XEXP (DECL_RTL (fndecl), 0));
else
mips16p = mips_base_mips16;