Commit 566dfd71 by Sandra Loosemore Committed by Sandra Loosemore

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
parent 4b459ae4
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> 2007-09-06 Richard Sandiford <richard@codesourcery.com>
PR target/33256 PR target/33256
......
...@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see ...@@ -57,6 +57,7 @@ along with GCC; see the file COPYING3. If not see
#include "sched-int.h" #include "sched-int.h"
#include "tree-gimple.h" #include "tree-gimple.h"
#include "bitmap.h" #include "bitmap.h"
#include "diagnostic.h"
/* True if X is an unspec wrapper around a SYMBOL_REF or LABEL_REF. */ /* True if X is an unspec wrapper around a SYMBOL_REF or LABEL_REF. */
#define UNSPEC_ADDRESS_P(X) \ #define UNSPEC_ADDRESS_P(X) \
...@@ -5327,7 +5328,12 @@ static void ...@@ -5327,7 +5328,12 @@ static void
mips_set_current_function (tree fndecl) mips_set_current_function (tree fndecl)
{ {
int mips16p; 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)); mips16p = SYMBOL_REF_MIPS16_FUNC_P (XEXP (DECL_RTL (fndecl), 0));
else else
mips16p = mips_base_mips16; mips16p = mips_base_mips16;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment