aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2007-09-06 14:20:37 -0400
committerSandra Loosemore <sandra@gcc.gnu.org>2007-09-06 14:20:37 -0400
commit566dfd713db9d71de2e1ff4ee176df4aacda7e6f (patch)
tree823e395ff5e58c50047bc79c375fcfd0738f0e77 /gcc
parent4b459ae43fc0c0db660394d4abf0f754d2202c6a (diff)
downloadgcc-566dfd713db9d71de2e1ff4ee176df4aacda7e6f.zip
gcc-566dfd713db9d71de2e1ff4ee176df4aacda7e6f.tar.gz
gcc-566dfd713db9d71de2e1ff4ee176df4aacda7e6f.tar.bz2
mips.c: Include diagnostic.h.
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/mips/mips.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d95fa47..e304f1d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 82986ca..cf8c337 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see
#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) \
@@ -5327,7 +5328,12 @@ static void
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;