From: crux Date: Mon, 13 Mar 2000 19:35:38 +0000 (+0000) Subject: Fix recently introduced error in expand_end_case. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68ba29ecf9ceaca082a1278539a46fc643706836;p=thirdparty%2Fgcc.git Fix recently introduced error in expand_end_case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32511 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a6faefccff4f..1589abdf01e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-03-13 Bernd Schmidt + + * stmt.c (expand_end_case): RANGE may be signed, and when checking + whether it is too large we must also verify that it isn't negative. + 2000-03-13 Jakub Jelinek * config/sparc/sparc.md: Remove all traces of TARGET_LIVE_G0. diff --git a/gcc/stmt.c b/gcc/stmt.c index 9be159dbc923..e919cd2c152d 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -5402,6 +5402,9 @@ expand_end_case (orig_index) else if (count < CASE_VALUES_THRESHOLD || compare_tree_int (range, 10 * count) > 0 + /* RANGE may be signed, and really large ranges will show up + as negative numbers. */ + || compare_tree_int (range, 0) < 0 #ifndef ASM_OUTPUT_ADDR_DIFF_ELT || flag_pic #endif