[patch] Change "internal consistency failure" from fatal_error to internal_error

Volker Reichelt reichelt@igpm.rwth-aachen.de
Fri Aug 25 23:58:00 GMT 2006


In PR 28243 the compiler dies with the message:

bug.c: In function 'foo':
bug.c:25: fatal error: internal consistency failure
compilation terminated.

IMHO the error shouldn't be a fatal_error, but an internal_error.
We have three places in flow.c where we issue this message as a
fatal_error:

flow.c:493:  fatal_error ("internal consistency failure");
flow.c:518:       fatal_error ("internal consistency failure");
flow.c:540:           fatal_error ("internal consistency failure");

But we issue an ICE with the same message here:

emit-rtl.c:2239:      internal_error ("internal consistency failure");

The patch below changes the error to an ICE in flow.c.

This is not really a regression, but it's a trivial patch with low risk.
Bootstrapped and regtested on x86_64-unknown-linux-gnu.
Ok for mainline now, or should this wait for 4.3?

Regards,
Volker

:ADDPATCH middle-end:


2006-08-25  Volker Reichelt  <reichelt@igpm.rwth-aachen.de>

	* flow.c (verify_wide_reg): Use internal_error for consistency failure.
	(verify_local_live_at_start): Likewise.

===================================================================
--- gcc/gcc/flow.c	(revision 115576)
+++ gcc/gcc/flow.c	(working copy)
@@ -490,7 +490,7 @@ verify_wide_reg (int regno, basic_block bb)
       fprintf (dump_file, "Register %d died unexpectedly.\n", regno);
       dump_bb (bb, dump_file, 0);
     }
-  fatal_error ("internal consistency failure");
+  internal_error ("internal consistency failure");
 }
 
 /* A subroutine of update_life_info.  Verify that there are no untoward
@@ -515,7 +515,7 @@ verify_local_live_at_start (regset new_live_at_start,
 	      fputs ("Old:\n", dump_file);
 	      dump_bb (bb, dump_file, 0);
 	    }
-	  fatal_error ("internal consistency failure");
+	  internal_error ("internal consistency failure");
 	}
     }
   else
@@ -537,7 +537,7 @@ verify_local_live_at_start (regset new_live_at_start,
 			   "Register %d died unexpectedly.\n", i);
 		  dump_bb (bb, dump_file, 0);
 		}
-	      fatal_error ("internal consistency failure");
+	      internal_error ("internal consistency failure");
 	    }
 	  /* Verify that the now-live register is wider than word_mode.  */
 	  verify_wide_reg (i, bb);
===================================================================




More information about the Gcc-patches mailing list