This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r121254 - in /trunk/gcc: ChangeLog common.opt c...


Author: ian
Date: Sun Jan 28 05:15:06 2007
New Revision: 121254

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121254
Log:
./:
	* common.opt: Add fstrict-overflow.
	* opts.c (decode_options): Set flag_strict_overflow if -O2.
	* flags.h (TYPE_OVERFLOW_WRAPS): Define.
	(TYPE_OVERFLOW_UNDEFINED): Define.
	(TYPE_OVERFLOW_TRAPS): Define.  This replaces TYPE_TRAP_SIGNED.
	Replace all uses.
	* tree.h (TYPE_TRAP_SIGNED): Don't define.
	* fold-const.c (negate_expr_p): Use TYPE_OVERFLOW_UNDEFINED.
	(fold_negate_expr): Likewise.
	(make_range): Likewise.
	(extract_muldiv_1): Likewise.
	(maybe_canonicalize_comparison): Likewise.
	(fold_comparison): Likewise.
	(fold_binary): Likewise.
	(tree_expr_nonnegative_p): Likewise.
	(tree_expr_nonzero_p): Likewise.
	* tree-vrp.c (compare_values): Likewise.
	(extract_range_from_binary_expr): Likewise.
	(extract_range_from_unary_expr): Likewise.
	* tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness):
	Likewise.
	(nowrap_type_p): Likewise.
	* tree-scalar-evolution.c (simple_iv): Likewise.
	* fold-const.c (negate_expr_p): Use TYPE_OVERFLOW_WRAPS.
	(build_range_check): Likewise.
	(extract_muldiv_1): Likewise.
	(fold_comparison): Likewise.
	* tree-vrp.c (vrp_int_const_binop): Likewise.
	(extract_range_from_unary_expr): Likewise.
	* convert.c (convert_to_integer): Likewise.
	* fold-const.c (fold_negate_expr): Use TYPE_OVERFLOW_TRAPS.
	(fold_comparison): Likewise.
	(fold_binary): Likewise.
	* optabs.c (optab_for_tree_code): Likewise.
	* tree-vectorizer.c (vect_is_simple_reduction): Likewise.
	* simplify-rtx.c (simplify_const_relational_operation): Check
	flag_strict_overflow and flag_trapv.
	(simplify_const_relational_operation): Likewise.
	* doc/invoke.texi (Option Summary): Mention -fstrict-overflow.
	(Optimize Options): Add -fstrict-overflow to -O2 list.  Document
	-fstrict-overflow.
testsuite/:
	* gcc.dg/strict-overflow-1.c: New test.
	* gcc.dg/no-strict-overflow-1.c: New test.
	* gcc.dg/strict-overflow-2.c: New test.
	* gcc.dg/no-strict-overflow-2.c: New test.
	* gcc.dg/strict-overflow-3.c: New test.
	* gcc.dg/no-strict-overflow-3.c: New test.
	* gcc.dg/strict-overflow-4.c: New test.
	* gcc.dg/no-strict-overflow-4.c: New test.
	* gcc.dg/fold-mod-1.c: Add -fstrict-overflow option.
	* gcc.dg/pr15784-1.c: Likewise.
	* gcc.dg/pr20922-1.c: Likewise.
	* gcc.dg/pr20922-3.c: Likewise.
	* gcc.dg/pr20922-4.c: Likewise.
	* gcc.dg/pr20922-6.c: Likewise.
	* gcc.dg/compare-4.c: Likewise.
	* gcc.dg/torture/pr26898-1.c: Likewise.
	* gcc.dg/tree-ssa/divide-1.c: Likewise.
	* gcc.dg/tree-ssa/divide-2.c: Likewise.
	* gcc.dg/tree-ssa/divide-3.c: Likewise.
	* gcc.dg/tree-ssa/divide-4.c: Likewise.
	* gcc.dg/tree-ssa/pr14490-1.c: Likewise.
	* gcc.dg/tree-ssa/pr14490-3.c: Likewise.
	* gcc.dg/tree-ssa/pr21082.c: Likewise.
	* gcc.dg/tree-ssa/pr26899.c: Likewise.
	* g++.dg/tree-ssa/pr21082.C: Likewise.

Added:
    trunk/gcc/testsuite/gcc.dg/no-strict-overflow-1.c
    trunk/gcc/testsuite/gcc.dg/no-strict-overflow-2.c
    trunk/gcc/testsuite/gcc.dg/no-strict-overflow-3.c
    trunk/gcc/testsuite/gcc.dg/no-strict-overflow-4.c
    trunk/gcc/testsuite/gcc.dg/strict-overflow-1.c
    trunk/gcc/testsuite/gcc.dg/strict-overflow-2.c
    trunk/gcc/testsuite/gcc.dg/strict-overflow-3.c
    trunk/gcc/testsuite/gcc.dg/strict-overflow-4.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/common.opt
    trunk/gcc/convert.c
    trunk/gcc/doc/invoke.texi
    trunk/gcc/flags.h
    trunk/gcc/fold-const.c
    trunk/gcc/optabs.c
    trunk/gcc/opts.c
    trunk/gcc/simplify-rtx.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/tree-ssa/pr21082.C
    trunk/gcc/testsuite/gcc.dg/compare4.c
    trunk/gcc/testsuite/gcc.dg/fold-mod-1.c
    trunk/gcc/testsuite/gcc.dg/pr15784-1.c
    trunk/gcc/testsuite/gcc.dg/pr20922-1.c
    trunk/gcc/testsuite/gcc.dg/pr20922-3.c
    trunk/gcc/testsuite/gcc.dg/pr20922-4.c
    trunk/gcc/testsuite/gcc.dg/pr20922-6.c
    trunk/gcc/testsuite/gcc.dg/torture/pr26898-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/divide-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/divide-2.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/divide-3.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/divide-4.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr14490-1.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr14490-3.c
    trunk/gcc/testsuite/gcc.dg/tree-ssa/pr26899.c
    trunk/gcc/tree-eh.c
    trunk/gcc/tree-scalar-evolution.c
    trunk/gcc/tree-ssa-loop-niter.c
    trunk/gcc/tree-vect-generic.c
    trunk/gcc/tree-vectorizer.c
    trunk/gcc/tree-vrp.c
    trunk/gcc/tree.h


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]