]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
mips.c: Include diagnostic.h.
authorSandra Loosemore <sandra@codesourcery.com>
Thu, 6 Sep 2007 18:20:37 +0000 (14:20 -0400)
committerSandra Loosemore <sandra@gcc.gnu.org>
Thu, 6 Sep 2007 18:20:37 +0000 (14:20 -0400)
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

gcc/ChangeLog
gcc/config/mips/mips.c

index d95fa4715b76089ef03d25a9dffbdad9d6597b43..e304f1df927a69ee57488836f6c84bba2d7bfdf2 100644 (file)
@@ -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
index 82986cae39848fd34b7d262040b0f4dd378986c6..cf8c337afa76f63eb0adc3b4f7f684a41256509a 100644 (file)
@@ -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;