aboutsummaryrefslogtreecommitdiff
path: root/gcc/function-tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/function-tests.c')
-rw-r--r--gcc/function-tests.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/function-tests.c b/gcc/function-tests.c
index f1e29e4..2440dd6 100644
--- a/gcc/function-tests.c
+++ b/gcc/function-tests.c
@@ -570,6 +570,19 @@ test_conversion_to_ssa ()
ASSERT_EQ (SSA_NAME, TREE_CODE (gimple_return_retval (return_stmt)));
}
+/* Test range folding. We must start this here because we need cfun
+ set. */
+
+static void
+test_ranges ()
+{
+ tree fndecl = build_trivial_high_gimple_function ();
+ function *fun = DECL_STRUCT_FUNCTION (fndecl);
+ push_cfun (fun);
+ range_tests ();
+ pop_cfun ();
+}
+
/* Test of expansion from gimple-ssa to RTL. */
static void
@@ -674,6 +687,7 @@ function_tests_c_tests ()
test_gimplification ();
test_building_cfg ();
test_conversion_to_ssa ();
+ test_ranges ();
test_expansion_to_rtl ();
}