acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING, GC_CHECKING, GC_ALWAYS_COLLECT.

1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>

	* acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING,
	GC_CHECKING, GC_ALWAYS_COLLECT.
	* configure.in: Allow --enable-checking with an argument
	listing check modes to enable.
	* config.in, configure: Rebuilt.
	* ggc-page.c, ggc-simple.c: Define GGC_POISON (and
	GGC_ALWAYS_VERIFY for ggc-simple.c) only if
	ENABLE_GC_CHECKING.  Define GGC_ALWAYS_COLLECT only if
	ENABLE_GC_ALWAYS_COLLECT.
	* rtl.h, rtl.c: Change ENABLE_CHECKING to ENABLE_RTL_CHECKING
	throughout.
	* tree.h, tree.c: Change ENABLE_CHECKING to
	ENABLE_TREE_CHECKING throughout.

	* cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
	throughout.

From-SVN: r31093
This commit is contained in:
Zack Weinberg 1999-12-26 23:06:54 +00:00 committed by Zack Weinberg
parent f0ad3f4675
commit f4524c9e9c
13 changed files with 357 additions and 235 deletions

View File

@ -1,3 +1,19 @@
1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
* acconfig.h: New ENABLE flags: TREE_CHECKING, RTL_CHECKING,
GC_CHECKING, GC_ALWAYS_COLLECT.
* configure.in: Allow --enable-checking with an argument
listing check modes to enable.
* config.in, configure: Rebuilt.
* ggc-page.c, ggc-simple.c: Define GGC_POISON (and
GGC_ALWAYS_VERIFY for ggc-simple.c) only if
ENABLE_GC_CHECKING. Define GGC_ALWAYS_COLLECT only if
ENABLE_GC_ALWAYS_COLLECT.
* rtl.h, rtl.c: Change ENABLE_CHECKING to ENABLE_RTL_CHECKING
throughout.
* tree.h, tree.c: Change ENABLE_CHECKING to
ENABLE_TREE_CHECKING throughout.
Sun Dec 26 07:48:20 1999 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* fold-const.c (fold_truthop): Properly check for FP RHS.

View File

@ -4,9 +4,29 @@
/* Define if printf supports "%p". */
#undef HAVE_PRINTF_PTR
/* Define if you want expensive run-time checks. */
/* Define if you want more run-time sanity checks. This one gets a grab
bag of miscellaneous but relatively cheap checks. */
#undef ENABLE_CHECKING
/* Define if you want all operations on trees (the basic data
structure of the front ends) to be checked for dynamic type safety
at runtime. This is moderately expensive. */
#undef ENABLE_TREE_CHECKING
/* Define if you want all operations on RTL (the basic data structure
of the optimizer and back end) to be checked for dynamic type safety
at runtime. This is quite expensive. */
#undef ENABLE_RTL_CHECKING
/* Define if you want the garbage collector to do object poisoning and
other memory allocation checks. This is quite expensive. */
#undef ENABLE_GC_CHECKING
/* Define if you want the garbage collector to operate in maximally
paranoid mode, validating the entire heap and collecting garbage at
every opportunity. This is extremely expensive. */
#undef ENABLE_GC_ALWAYS_COLLECT
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS

View File

@ -5,9 +5,29 @@
/* Define if printf supports "%p". */
#undef HAVE_PRINTF_PTR
/* Define if you want expensive run-time checks. */
/* Define if you want more run-time sanity checks. This one gets a grab
bag of miscellaneous but relatively cheap checks. */
#undef ENABLE_CHECKING
/* Define if you want all operations on trees (the basic data
structure of the front ends) to be checked for dynamic type safety
at runtime. This is moderately expensive. */
#undef ENABLE_TREE_CHECKING
/* Define if you want all operations on RTL (the basic data structure
of the optimizer and back end) to be checked for dynamic type safety
at runtime. This is quite expensive. */
#undef ENABLE_RTL_CHECKING
/* Define if you want the garbage collector to do object poisoning and
other memory allocation checks. This is quite expensive. */
#undef ENABLE_GC_CHECKING
/* Define if you want the garbage collector to operate in maximally
paranoid mode, validating the entire heap and collecting garbage at
every opportunity. This is extremely expensive. */
#undef ENABLE_GC_ALWAYS_COLLECT
/* Define to 1 if NLS is requested. */
#undef ENABLE_NLS

466
gcc/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -176,11 +176,30 @@ fi
# Enable expensive internal checks
AC_ARG_ENABLE(checking,
[ --enable-checking enable expensive run-time checks.],
[ --enable-checking[=LIST]
enable expensive run-time checks. With LIST,
enable only specific categories of checks.
Categories are: misc,tree,rtl,gc,gcac; default
is misc,tree,rtl],
[case "${enableval}" in
yes) AC_DEFINE(ENABLE_CHECKING) ;;
yes) AC_DEFINE(ENABLE_CHECKING)
AC_DEFINE(ENABLE_TREE_CHECKING)
AC_DEFINE(ENABLE_RTL_CHECKING) ;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} given for checking option) ;;
*) ac_save_IFS="$IFS" IFS="$IFS,"
set fnord $enableval; shift
IFS="$ac_save_IFS"
for check; do
case $check in
misc) AC_DEFINE(ENABLE_CHECKING) ;;
tree) AC_DEFINE(ENABLE_TREE_CHECKING) ;;
rtl) AC_DEFINE(ENABLE_RTL_CHECKING) ;;
gc) AC_DEFINE(ENABLE_GC_CHECKING) ;;
gcac) AC_DEFINE(ENABLE_GC_ALWAYS_COLLECT) ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
;;
esac])
AC_ARG_ENABLE(cpp,

View File

@ -1,3 +1,8 @@
1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
* cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
throughout.
1999-12-26 Mark Mitchell <mark@codesourcery.com>
* decl.c (store_return_init): Use mode of old RTL generated for

View File

@ -127,7 +127,7 @@ Boston, MA 02111-1307, USA. */
/* Language-specific tree checkers. */
#if defined ENABLE_CHECKING && (GCC_VERSION >= 2007)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
#define VAR_OR_FUNCTION_DECL_CHECK(NODE) \
({ const tree __t = NODE; \
@ -156,7 +156,7 @@ Boston, MA 02111-1307, USA. */
__LINE__, __PRETTY_FUNCTION__); \
__t; })
#else /* not ENABLE_CHECKING, or not gcc */
#else /* not ENABLE_TREE_CHECKING, or not gcc */
#define VAR_OR_FUNCTION_DECL_CHECK(NODE) NODE
#define VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK(NODE) NODE

View File

@ -78,10 +78,10 @@
last collection. */
#undef GGC_ALWAYS_COLLECT
/* If ENABLE_CHECKING is defined, enable GGC_POISON and
GGC_ALWAYS_COLLECT automatically. */
#ifdef ENABLE_CHECKING
#ifdef ENABLE_GC_CHECKING
#define GGC_POISON
#endif
#ifdef ENABLE_GC_ALWAYS_COLLECT
#define GGC_ALWAYS_COLLECT
#endif

View File

@ -47,11 +47,13 @@
/* Always verify that the to-be-marked memory is collectable. */
#undef GGC_ALWAYS_VERIFY
#ifdef ENABLE_CHECKING
#ifdef ENABLE_GC_CHECKING
#define GGC_POISON
#define GGC_ALWAYS_COLLECT
#define GGC_ALWAYS_VERIFY
#endif
#ifdef ENABLE_GC_ALWAYS_COLLECT
#define GGC_ALWAYS_COLLECT
#endif
/* Constants for general use. */

View File

@ -1128,7 +1128,7 @@ read_rtx (infile)
return return_rtx;
}
#if defined ENABLE_CHECKING && (GCC_VERSION >= 2007)
#if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
void
rtl_check_failed_bounds (r, n, file, line, func)
rtx r;
@ -1212,7 +1212,7 @@ rtvec_check_failed_bounds (r, n, file, line, func)
n, GET_NUM_ELEM (r)-1);
fancy_abort (file, line, func);
}
#endif /* ENABLE_CHECKING */
#endif /* ENABLE_RTL_CHECKING */
/* These are utility functions used by fatal-error functions all over the
code. rtl.c happens to be linked by all the programs that need them,

View File

@ -226,7 +226,7 @@ typedef struct rtvec_def{
/* General accessor macros for accessing the fields of an rtx. */
#if defined ENABLE_CHECKING && (GCC_VERSION >= 2007)
#if defined ENABLE_RTL_CHECKING && (GCC_VERSION >= 2007)
/* The bit with a star outside the statement expr and an & inside is
so that N can be evaluated only once. */
#define RTL_CHECK1(RTX, N, C1) \
@ -293,7 +293,7 @@ extern void rtvec_check_failed_bounds PROTO((rtvec, int,
const char *, int, const char *))
ATTRIBUTE_NORETURN;
#else /* not ENABLE_CHECKING */
#else /* not ENABLE_RTL_CHECKING */
#define RTL_CHECK1(RTX, N, C1) ((RTX)->fld[N])
#define RTL_CHECK2(RTX, N, C1, C2) ((RTX)->fld[N])

View File

@ -1975,14 +1975,14 @@ chainon (op1, op2)
if (op1)
{
register tree t1;
#ifdef ENABLE_CHECKING
#ifdef ENABLE_TREE_CHECKING
register tree t2;
#endif
for (t1 = op1; TREE_CHAIN (t1); t1 = TREE_CHAIN (t1))
;
TREE_CHAIN (t1) = op2;
#ifdef ENABLE_CHECKING
#ifdef ENABLE_TREE_CHECKING
for (t2 = op2; t2; t2 = TREE_CHAIN (t2))
if (t2 == t1)
abort (); /* Circularity created. */
@ -5221,7 +5221,7 @@ get_set_constructor_bytes (init, buffer, wd_size)
return non_const_bits;
}
#if defined ENABLE_CHECKING && (GCC_VERSION >= 2007)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
/* Complain that the tree code of NODE does not match the expected CODE.
FILE, LINE, and FUNCTION are of the caller. */
void
@ -5253,7 +5253,7 @@ tree_class_check_failed (node, cl, file, line, function)
fancy_abort (file, line, function);
}
#endif /* ENABLE_CHECKING */
#endif /* ENABLE_TREE_CHECKING */
/* Return the alias set for T, which may be either a type or an
expression. */

View File

@ -321,7 +321,7 @@ struct tree_common
/* When checking is enabled, errors will be generated if a tree node
is accessed incorrectly. The macros abort with a fatal error. */
#if defined ENABLE_CHECKING && (GCC_VERSION >= 2007)
#if defined ENABLE_TREE_CHECKING && (GCC_VERSION >= 2007)
#define TREE_CHECK(t, code) \
({ const tree __t = t; \
@ -360,7 +360,7 @@ extern void tree_class_check_failed PROTO((const tree, char,
const char *, int, const char *))
ATTRIBUTE_NORETURN;
#else /* not ENABLE_CHECKING, or not gcc */
#else /* not ENABLE_TREE_CHECKING, or not gcc */
#define TREE_CHECK(t, code) (t)
#define TREE_CLASS_CHECK(t, code) (t)